mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 23:54:24 +01:00
Merge branch 'Baystation12/dev' into ofChemistryAndStuff
Conflicts: code/modules/mob/living/carbon/monkey/life.dm code/modules/mob/living/carbon/monkey/monkey.dm code/modules/reagents/Chemistry-Reagents.dm code/modules/reagents/reagent_containers/glass.dm
This commit is contained in:
@@ -181,7 +181,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
|
||||
switch(param)
|
||||
if("reason")
|
||||
if(!value)
|
||||
value = input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text
|
||||
value = sanitize(input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text)
|
||||
value = sql_sanitize_text(value)
|
||||
if(!value)
|
||||
usr << "Cancelled"
|
||||
|
||||
@@ -92,7 +92,7 @@ var/global/floorIsLava = 0
|
||||
body += "<br>"
|
||||
|
||||
//Monkey
|
||||
if(ismonkey(M))
|
||||
if(issmall(M))
|
||||
body += "<B>Monkeyized</B> | "
|
||||
else
|
||||
body += "<A href='?src=\ref[src];monkeyone=\ref[M]'>Monkeyize</A> | "
|
||||
@@ -725,10 +725,10 @@ var/global/floorIsLava = 0
|
||||
set desc="Announce your desires to the world"
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/message = input("Global message to send:", "Admin Announce", null, null) as message
|
||||
var/message = input("Global message to send:", "Admin Announce", null, null) as message//todo: sanitize for all?
|
||||
if(message)
|
||||
if(!check_rights(R_SERVER,0))
|
||||
message = adminscrub(message,500)
|
||||
message = sanitize(message, 500, extra = 0)
|
||||
world << "\blue <b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b>\n \t [message]"
|
||||
log_admin("Announce: [key_name(usr)] : [message]")
|
||||
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -953,25 +953,6 @@ var/global/floorIsLava = 0
|
||||
|
||||
return 0
|
||||
|
||||
/*
|
||||
/datum/admins/proc/get_sab_desc(var/target)
|
||||
switch(target)
|
||||
if(1)
|
||||
return "Destroy at least 70% of the phoron canisters on the station"
|
||||
if(2)
|
||||
return "Destroy the AI"
|
||||
if(3)
|
||||
var/count = 0
|
||||
for(var/mob/living/carbon/monkey/Monkey in world)
|
||||
if(Monkey.z in station_levels)
|
||||
count++
|
||||
return "Kill all [count] of the monkeys on the station"
|
||||
if(4)
|
||||
return "Cut power to at least 80% of the station"
|
||||
else
|
||||
return "Error: Invalid sabotage target: [target]"
|
||||
*/
|
||||
|
||||
/datum/admins/proc/spawn_fruit()
|
||||
set category = "Debug"
|
||||
set desc = "Spawn the product of a seed."
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/client/proc/admin_memo_write()
|
||||
var/savefile/F = new(MEMOFILE)
|
||||
if(F)
|
||||
var/memo = input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message
|
||||
var/memo = sanitize(input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message, extra = 0)
|
||||
switch(memo)
|
||||
if(null)
|
||||
return
|
||||
|
||||
@@ -602,9 +602,10 @@ var/list/admin_verbs_mentor = list(
|
||||
var/mob/living/carbon/human/H = T
|
||||
if (H.species)
|
||||
D.affected_species = list(H.species.name)
|
||||
if(istype(T,/mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/M = T
|
||||
D.affected_species = list(M.greaterform)
|
||||
if(H.species.primitive_form)
|
||||
D.affected_species |= H.species.primitive_form
|
||||
if(H.species.greater_form)
|
||||
D.affected_species |= H.species.greater_form
|
||||
infect_virus2(T,D,1)
|
||||
|
||||
feedback_add_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -616,7 +617,7 @@ var/list/admin_verbs_mentor = list(
|
||||
set name = "Make Sound"
|
||||
set desc = "Display a message to everyone who can hear the target"
|
||||
if(O)
|
||||
var/message = input("What do you want the message to be?", "Make Sound") as text|null
|
||||
var/message = sanitize(input("What do you want the message to be?", "Make Sound") as text|null)
|
||||
if(!message)
|
||||
return
|
||||
for (var/mob/V in hearers(O))
|
||||
@@ -708,7 +709,7 @@ var/list/admin_verbs_mentor = list(
|
||||
return
|
||||
|
||||
if(holder)
|
||||
var/new_name = trim_strip_input(src, "Enter new name. Leave blank or as is to cancel.", "Enter new silicon name", S.real_name)
|
||||
var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "Enter new silicon name", S.real_name))
|
||||
if(new_name && new_name != S.real_name)
|
||||
admin_log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'")
|
||||
S.SetName(new_name)
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
M_job = M.job
|
||||
else if(isslime(M))
|
||||
M_job = "slime"
|
||||
else if(ismonkey(M))
|
||||
else if(issmall(M))
|
||||
M_job = "Monkey"
|
||||
else if(isalien(M))
|
||||
M_job = "Alien"
|
||||
@@ -342,7 +342,7 @@
|
||||
dat += "<td>New Player</td>"
|
||||
else if(isobserver(M))
|
||||
dat += "<td>Ghost</td>"
|
||||
else if(ismonkey(M))
|
||||
else if(issmall(M))
|
||||
dat += "<td>Monkey</td>"
|
||||
else if(isalien(M))
|
||||
dat += "<td>Alien</td>"
|
||||
|
||||
+19
-64
@@ -266,7 +266,7 @@
|
||||
if("nymph") M.change_mob_type( /mob/living/carbon/alien/diona , null, null, delmob )
|
||||
if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob, href_list["species"])
|
||||
if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob )
|
||||
if("monkey") M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob )
|
||||
if("monkey") M.change_mob_type( /mob/living/carbon/human/monkey , null, null, delmob )
|
||||
if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob )
|
||||
if("cat") M.change_mob_type( /mob/living/simple_animal/cat , null, null, delmob )
|
||||
if("runtime") M.change_mob_type( /mob/living/simple_animal/cat/fluff/Runtime , null, null, delmob )
|
||||
@@ -328,12 +328,12 @@
|
||||
mins = min(525599,mins)
|
||||
minutes = CMinutes + mins
|
||||
duration = GetExp(minutes)
|
||||
reason = input(usr,"Reason?","reason",reason2) as text|null
|
||||
reason = sanitize(input(usr,"Reason?","reason",reason2) as text|null)
|
||||
if(!reason) return
|
||||
if("No")
|
||||
temp = 0
|
||||
duration = "Perma"
|
||||
reason = input(usr,"Reason?","reason",reason2) as text|null
|
||||
reason = sanitize(input(usr,"Reason?","reason",reason2) as text|null)
|
||||
if(!reason) return
|
||||
|
||||
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
||||
@@ -655,7 +655,7 @@
|
||||
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
|
||||
if(!mins)
|
||||
return
|
||||
var/reason = input(usr,"Reason?","Please State Reason","") as text|null
|
||||
var/reason = sanitize(input(usr,"Reason?","Please State Reason","") as text|null)
|
||||
if(!reason)
|
||||
return
|
||||
|
||||
@@ -680,7 +680,7 @@
|
||||
return 1
|
||||
if("No")
|
||||
if(!check_rights(R_BAN)) return
|
||||
var/reason = input(usr,"Reason?","Please State Reason","") as text|null
|
||||
var/reason = sanitize(input(usr,"Reason?","Please State Reason","") as text|null)
|
||||
if(reason)
|
||||
var/msg
|
||||
for(var/job in notbannedlist)
|
||||
@@ -737,7 +737,7 @@
|
||||
if (ismob(M))
|
||||
if(!check_if_greater_rights_than(M.client))
|
||||
return
|
||||
var/reason = input("Please enter reason")
|
||||
var/reason = sanitize(input("Please enter reason"))
|
||||
if(!reason)
|
||||
M << "\red You have been kicked from the server"
|
||||
else
|
||||
@@ -794,7 +794,7 @@
|
||||
if(!mins)
|
||||
return
|
||||
if(mins >= 525600) mins = 525599
|
||||
var/reason = input(usr,"Reason?","reason","Griefer") as text|null
|
||||
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
|
||||
if(!reason)
|
||||
return
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
|
||||
@@ -815,7 +815,7 @@
|
||||
//del(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
|
||||
if("No")
|
||||
if(!check_rights(R_BAN)) return
|
||||
var/reason = input(usr,"Reason?","reason","Griefer") as text|null
|
||||
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
|
||||
if(!reason)
|
||||
return
|
||||
switch(alert(usr,"IP ban?",,"Yes","No","Cancel"))
|
||||
@@ -1183,44 +1183,6 @@
|
||||
show_player_panel(H)
|
||||
//H.regenerate_icons()
|
||||
|
||||
/***************** BEFORE**************
|
||||
|
||||
if (href_list["l_players"])
|
||||
var/dat = "<B>Name/Real Name/Key/IP:</B><HR>"
|
||||
for(var/mob/M in world)
|
||||
var/foo = ""
|
||||
if (ismob(M) && M.client)
|
||||
if(!M.client.authenticated && !M.client.authenticating)
|
||||
foo += text("\[ <A HREF='?src=\ref[];adminauth=\ref[]'>Authorize</A> | ", src, M)
|
||||
else
|
||||
foo += text("\[ <B>Authorized</B> | ")
|
||||
if(M.start)
|
||||
if(!istype(M, /mob/living/carbon/monkey))
|
||||
foo += text("<A HREF='?src=\ref[];monkeyone=\ref[]'>Monkeyize</A> | ", src, M)
|
||||
else
|
||||
foo += text("<B>Monkeyized</B> | ")
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
foo += text("<B>Is an AI</B> | ")
|
||||
else
|
||||
foo += text("<A HREF='?src=\ref[];makeai=\ref[]'>Make AI</A> | ", src, M)
|
||||
if(isNotAdminLevel(M.z))
|
||||
foo += text("<A HREF='?src=\ref[];sendtoprison=\ref[]'>Prison</A> | ", src, M)
|
||||
foo += text("<A HREF='?src=\ref[];sendtomaze=\ref[]'>Maze</A> | ", src, M)
|
||||
else
|
||||
foo += text("<B>On Z = [M.z]</B> | ")
|
||||
else
|
||||
foo += text("<B>Hasn't Entered Game</B> | ")
|
||||
foo += text("<A HREF='?src=\ref[];revive=\ref[]'>Heal/Revive</A> | ", src, M)
|
||||
|
||||
foo += text("<A HREF='?src=\ref[];forcespeech=\ref[]'>Say</A> \]", src, M)
|
||||
dat += text("N: [] R: [] (K: []) (IP: []) []<BR>", M.name, M.real_name, (M.client ? M.client : "No client"), M.lastKnownIP, foo)
|
||||
|
||||
usr << browse(dat, "window=players;size=900x480")
|
||||
|
||||
*****************AFTER******************/
|
||||
|
||||
// Now isn't that much better? IT IS NOW A PROC, i.e. kinda like a big panel like unstable
|
||||
|
||||
else if(href_list["adminplayeropts"])
|
||||
var/mob/M = locate(href_list["adminplayeropts"])
|
||||
show_player_panel(M)
|
||||
@@ -1379,7 +1341,7 @@
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
return
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcomm", "")
|
||||
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcomm", ""))
|
||||
if(!input) return
|
||||
|
||||
src.owner << "You sent [input] to [H] via a secure channel."
|
||||
@@ -1396,7 +1358,7 @@
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
return
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", "")
|
||||
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", ""))
|
||||
if(!input) return
|
||||
|
||||
src.owner << "You sent [input] to [H] via a secure channel."
|
||||
@@ -1443,6 +1405,7 @@
|
||||
var/mob/sender = locate(href_list["CentcommFaxReply"])
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
|
||||
//todo: sanitize
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(sender)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input) return
|
||||
|
||||
@@ -1647,7 +1610,7 @@
|
||||
where = "onfloor"
|
||||
|
||||
if ( where == "inhand" ) //Can only give when human or monkey
|
||||
if ( !( ishuman(usr) || ismonkey(usr) ) )
|
||||
if ( !( ishuman(usr) || issmall(usr) ) )
|
||||
usr << "Can only spawn in hand when you're a human or a monkey."
|
||||
where = "onfloor"
|
||||
else if ( usr.get_active_hand() )
|
||||
@@ -2426,9 +2389,7 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_channel_name"])
|
||||
src.admincaster_feed_channel.channel_name = strip_html_simple(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
|
||||
while (findtext(src.admincaster_feed_channel.channel_name," ") == 1)
|
||||
src.admincaster_feed_channel.channel_name = copytext(src.admincaster_feed_channel.channel_name,2,lentext(src.admincaster_feed_channel.channel_name)+1)
|
||||
src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_channel_lock"])
|
||||
@@ -2461,13 +2422,11 @@
|
||||
var/list/available_channels = list()
|
||||
for(var/datum/feed_channel/F in news_network.network_channels)
|
||||
available_channels += F.channel_name
|
||||
src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
|
||||
src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_new_message"])
|
||||
src.admincaster_feed_message.body = adminscrub(input(usr, "Write your Feed story", "Network Channel Handler", ""))
|
||||
while (findtext(src.admincaster_feed_message.body," ") == 1)
|
||||
src.admincaster_feed_message.body = copytext(src.admincaster_feed_message.body,2,lentext(src.admincaster_feed_message.body)+1)
|
||||
src.admincaster_feed_message.body = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_submit_new_message"])
|
||||
@@ -2509,15 +2468,11 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_wanted_name"])
|
||||
src.admincaster_feed_message.author = adminscrub(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
|
||||
while (findtext(src.admincaster_feed_message.author," ") == 1)
|
||||
src.admincaster_feed_message.author = copytext(admincaster_feed_message.author,2,lentext(admincaster_feed_message.author)+1)
|
||||
src.admincaster_feed_message.author = sanitize(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_wanted_desc"])
|
||||
src.admincaster_feed_message.body = adminscrub(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
|
||||
while (findtext(src.admincaster_feed_message.body," ") == 1)
|
||||
src.admincaster_feed_message.body = copytext(src.admincaster_feed_message.body,2,lentext(src.admincaster_feed_message.body)+1)
|
||||
src.admincaster_feed_message.body = sanitize(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_submit_wanted"])
|
||||
@@ -2622,7 +2577,7 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_signature"])
|
||||
src.admincaster_signature = adminscrub(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
|
||||
src.admincaster_signature = sanitize(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["populate_inactive_customitems"])
|
||||
@@ -2660,7 +2615,7 @@
|
||||
|
||||
if(href_list["add_player_info"])
|
||||
var/key = href_list["add_player_info"]
|
||||
var/add = input("Add Player Info") as null|text
|
||||
var/add = sanitize(input("Add Player Info") as null|text)
|
||||
if(!add) return
|
||||
|
||||
notes_add(key,add,usr)
|
||||
|
||||
@@ -23,7 +23,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
//clean the input msg
|
||||
if(!msg)
|
||||
return
|
||||
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
if(!msg)
|
||||
return
|
||||
var/original_msg = msg
|
||||
@@ -88,7 +88,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if(ai_found)
|
||||
ai_cl = " (<A HREF='?_src_=holder;adminchecklaws=\ref[mob]'>CL</A>)"
|
||||
|
||||
//Options bar: mob, details ( admin = 2, dev = 3, mentor = 4, character name (0 = just ckey, 1 = ckey and character name), link? (0 no don't make it a link, 1 do so),
|
||||
//Options bar: mob, details ( admin = 2, dev = 3, mentor = 4, character name (0 = just ckey, 1 = ckey and character name), link? (0 no don't make it a link, 1 do so),
|
||||
// highlight special roles (0 = everyone has same looking name, 1 = antags / special roles get a golden name)
|
||||
|
||||
var/mentor_msg = "\blue <b><font color=red>Request for Help: </font>[get_options_bar(mob, 4, 1, 1, 0)][ai_cl]:</b> [msg]"
|
||||
|
||||
@@ -60,8 +60,9 @@
|
||||
return
|
||||
|
||||
//clean the message if it's not sent by a high-rank admin
|
||||
//todo: sanitize for all???
|
||||
if(!check_rights(R_SERVER|R_DEBUG,0))
|
||||
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
var/recieve_pm_type = "Player"
|
||||
@@ -91,7 +92,7 @@
|
||||
spawn(0) //so we don't hold the caller proc up
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
var/reply = input(C, msg,"[recieve_pm_type] PM from [sendername]", "") as text|null //show message and await a reply
|
||||
var/reply = sanitize(input(C, msg,"[recieve_pm_type] PM from [sendername]", "") as text|null) //show message and await a reply
|
||||
if(C && reply)
|
||||
if(sender)
|
||||
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set hidden = 1
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_MENTOR)) return
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
log_admin("MOD: [key_name(src)] : [msg]")
|
||||
|
||||
if (!msg)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
var/display_name = src.key
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/input = input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null
|
||||
var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null, MAX_BOOK_MESSAGE_LEN, extra = 0)
|
||||
if(!input || input == "")
|
||||
custom_event_msg = null
|
||||
log_admin("[usr.key] has cleared the custom event text.")
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
world << "<h1 class='alert'>Custom Event</h1>"
|
||||
world << "<h2 class='alert'>A custom event is starting. OOC Info:</h2>"
|
||||
world << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
world << "<span class='alert'>[custom_event_msg]</span>"
|
||||
world << "<br>"
|
||||
|
||||
// normal verb for players to view info
|
||||
@@ -36,5 +36,5 @@
|
||||
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
src << "<span class='alert'>[custom_event_msg]</span>"
|
||||
src << "<br>"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if (src.holder.rights & R_ADMIN)
|
||||
stafftype = "ADMIN"
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
|
||||
if (!msg)
|
||||
|
||||
@@ -205,7 +205,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
return 0
|
||||
var/obj/item/device/paicard/card = new(T)
|
||||
var/mob/living/silicon/pai/pai = new(card)
|
||||
pai.name = input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text
|
||||
pai.name = sanitizeSafe(input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text)
|
||||
pai.real_name = pai.name
|
||||
pai.key = choice.key
|
||||
card.setPersonality(pai)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
return .(O.vars[variable])
|
||||
|
||||
if("text")
|
||||
var/new_value = input("Enter new text:","Text",O.vars[variable]) as text|null
|
||||
var/new_value = input("Enter new text:","Text",O.vars[variable]) as text|null//todo: sanitize ???
|
||||
if(new_value == null) return
|
||||
O.vars[variable] = new_value
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
switch(class)
|
||||
|
||||
if("text")
|
||||
var_value = input("Enter new text:","Text") as null|text
|
||||
var_value = input("Enter new text:","Text") as null|text//todo: sanitize ???
|
||||
|
||||
if("num")
|
||||
var_value = input("Enter new number:","Num") as null|num
|
||||
@@ -93,7 +93,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
switch(class)
|
||||
|
||||
if("text")
|
||||
var_value = input("Enter new text:","Text") as text
|
||||
var_value = input("Enter new text:","Text") as text//todo: sanitize ???
|
||||
|
||||
if("num")
|
||||
var_value = input("Enter new number:","Num") as num
|
||||
@@ -243,7 +243,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
return
|
||||
|
||||
if("text")
|
||||
L[L.Find(variable)] = input("Enter new text:","Text") as text
|
||||
L[L.Find(variable)] = input("Enter new text:","Text") as text//todo: sanitize ???
|
||||
|
||||
if("num")
|
||||
L[L.Find(variable)] = input("Enter new number:","Num") as num
|
||||
@@ -450,7 +450,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
return .(O.vars[variable])
|
||||
|
||||
if("text")
|
||||
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text
|
||||
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text//todo: sanitize ???
|
||||
if(var_new==null) return
|
||||
O.vars[variable] = var_new
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
if(usr.client)
|
||||
@@ -29,14 +29,14 @@
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender , var/iamessage)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
var/msg = sanitize(text)
|
||||
msg = "\blue <b><font color=orange>CENTCOMM[iamessage ? " IA" : ""]:</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>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<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/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
var/msg = sanitize(text)
|
||||
msg = "\blue <b><font color=crimson>ILLEGAL:</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>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<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]'>RPLY</A>):</b> [msg]"
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/msg = input("Message:", text("Subtle PM to [M.key]")) as text
|
||||
var/msg = sanitize(input("Message:", text("Subtle PM to [M.key]")) as text)
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -109,7 +109,7 @@
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
|
||||
var/msg = sanitize(input("Message:", text("Enter the text you wish to appear to everyone:")) as text)
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -132,7 +132,7 @@
|
||||
if(!M)
|
||||
return
|
||||
|
||||
var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
|
||||
var/msg = sanitize(input("Message:", text("Enter the text you wish to appear to your target:")) as text)
|
||||
|
||||
if( !msg )
|
||||
return
|
||||
@@ -368,19 +368,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
usr << "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>"
|
||||
return
|
||||
|
||||
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
||||
|
||||
//check if they were a monkey
|
||||
if(findtext(G_found.real_name,"monkey"))
|
||||
if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
||||
var/mob/living/carbon/monkey/new_monkey = new(pick(latejoin))
|
||||
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
||||
new_monkey.key = G_found.key
|
||||
new_monkey << "You have been fully respawned. Enjoy the game."
|
||||
message_admins("\blue [key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno.", 1)
|
||||
return //all done. The ghost is auto-deleted
|
||||
|
||||
//Ok, it's not a monkey. So, spawn a human.
|
||||
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
|
||||
|
||||
var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character.
|
||||
@@ -475,7 +462,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
|
||||
var/input = sanitize(input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null)
|
||||
if(!input)
|
||||
return
|
||||
for(var/mob/living/silicon/ai/M in mob_list)
|
||||
@@ -523,8 +510,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null
|
||||
var/customname = input(usr, "Pick a title for the report.", "Title") as text|null
|
||||
var/input = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null, extra = 0)
|
||||
var/customname = sanitizeSafe(input(usr, "Pick a title for the report.", "Title") as text|null)
|
||||
if(!input)
|
||||
return
|
||||
if(!customname)
|
||||
|
||||
@@ -43,7 +43,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
|
||||
choice = null
|
||||
while(!choice)
|
||||
choice = sanitize(copytext(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
choice = sanitize(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""))
|
||||
if(!choice)
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||
return
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
if(custom_event_msg && custom_event_msg != "")
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
src << "<span class='alert'>[custom_event_msg]</span>"
|
||||
src << "<br>"
|
||||
|
||||
if( (world.address == address || !address) && !host )
|
||||
|
||||
@@ -995,16 +995,10 @@ datum/preferences
|
||||
ShowChoices(user)
|
||||
return
|
||||
if("general")
|
||||
var/msg = input(usr,"Give a general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Give a general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message, extra = 0)
|
||||
flavor_texts[href_list["task"]] = msg
|
||||
else
|
||||
var/msg = input(usr,"Set the flavor text for your [href_list["task"]].","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Set the flavor text for your [href_list["task"]].","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message, extra = 0)
|
||||
flavor_texts[href_list["task"]] = msg
|
||||
SetFlavorText(user)
|
||||
return
|
||||
@@ -1019,16 +1013,10 @@ datum/preferences
|
||||
ShowChoices(user)
|
||||
return
|
||||
if("Default")
|
||||
var/msg = input(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(flavour_texts_robot["Default"])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(flavour_texts_robot["Default"])) as message, extra = 0)
|
||||
flavour_texts_robot[href_list["task"]] = msg
|
||||
else
|
||||
var/msg = input(usr,"Set the flavour text for your robot with [href_list["task"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(flavour_texts_robot[href_list["task"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Set the flavour text for your robot with [href_list["task"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(flavour_texts_robot[href_list["task"]])) as message, extra = 0)
|
||||
flavour_texts_robot[href_list["task"]] = msg
|
||||
SetFlavourTextRobot(user)
|
||||
return
|
||||
@@ -1044,41 +1032,25 @@ datum/preferences
|
||||
else
|
||||
user << browse(null, "window=records")
|
||||
if(href_list["task"] == "med_record")
|
||||
var/medmsg = input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message
|
||||
|
||||
var/medmsg = sanitize(input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(medmsg != null)
|
||||
medmsg = copytext(medmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
medmsg = html_encode(medmsg)
|
||||
|
||||
med_record = medmsg
|
||||
SetRecords(user)
|
||||
|
||||
if(href_list["task"] == "sec_record")
|
||||
var/secmsg = input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message
|
||||
|
||||
var/secmsg = sanitize(input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(secmsg != null)
|
||||
secmsg = copytext(secmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
secmsg = html_encode(secmsg)
|
||||
|
||||
sec_record = secmsg
|
||||
SetRecords(user)
|
||||
if(href_list["task"] == "gen_record")
|
||||
var/genmsg = input(usr,"Set your employment notes here.","Employment Records",html_decode(gen_record)) as message
|
||||
|
||||
var/genmsg = sanitize(input(usr,"Set your employment notes here.","Employment Records",html_decode(gen_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(genmsg != null)
|
||||
genmsg = copytext(genmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
genmsg = html_encode(genmsg)
|
||||
|
||||
gen_record = genmsg
|
||||
SetRecords(user)
|
||||
|
||||
if(href_list["task"] == "exploitable_record")
|
||||
var/exploitmsg = input(usr,"Set exploitable information about you here.","Exploitable Information",html_decode(exploit_record)) as message
|
||||
|
||||
var/exploitmsg = sanitize(input(usr,"Set exploitable information about you here.","Exploitable Information",html_decode(exploit_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(exploitmsg != null)
|
||||
exploitmsg = copytext(exploitmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
exploitmsg = html_encode(exploitmsg)
|
||||
|
||||
exploit_record = exploitmsg
|
||||
SetAntagoptions(user)
|
||||
|
||||
@@ -1205,7 +1177,7 @@ datum/preferences
|
||||
if("name")
|
||||
var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null
|
||||
if (!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.)
|
||||
var/new_name = reject_bad_name(raw_name)
|
||||
var/new_name = sanitizeName(raw_name)
|
||||
if(new_name)
|
||||
real_name = new_name
|
||||
else
|
||||
@@ -1291,7 +1263,7 @@ datum/preferences
|
||||
if("metadata")
|
||||
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
|
||||
if(new_metadata)
|
||||
metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN))
|
||||
metadata = sanitize(new_metadata)
|
||||
|
||||
if("b_type")
|
||||
var/new_b_type = input(user, "Choose your character's blood-type:", "Character Preference") as null|anything in list( "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-" )
|
||||
@@ -1504,7 +1476,7 @@ datum/preferences
|
||||
if(choice == "Other")
|
||||
var/raw_choice = input(user, "Please enter a home system.") as text|null
|
||||
if(raw_choice)
|
||||
home_system = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
home_system = sanitize(raw_choice)
|
||||
return
|
||||
home_system = choice
|
||||
if("citizenship")
|
||||
@@ -1514,7 +1486,7 @@ datum/preferences
|
||||
if(choice == "Other")
|
||||
var/raw_choice = input(user, "Please enter your current citizenship.", "Character Preference") as text|null
|
||||
if(raw_choice)
|
||||
citizenship = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
citizenship = sanitize(raw_choice)
|
||||
return
|
||||
citizenship = choice
|
||||
if("faction")
|
||||
@@ -1524,7 +1496,7 @@ datum/preferences
|
||||
if(choice == "Other")
|
||||
var/raw_choice = input(user, "Please enter a faction.") as text|null
|
||||
if(raw_choice)
|
||||
faction = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
faction = sanitize(raw_choice)
|
||||
return
|
||||
faction = choice
|
||||
if("religion")
|
||||
@@ -1534,7 +1506,7 @@ datum/preferences
|
||||
if(choice == "Other")
|
||||
var/raw_choice = input(user, "Please enter a religon.") as text|null
|
||||
if(raw_choice)
|
||||
religion = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
religion = sanitize(raw_choice)
|
||||
return
|
||||
religion = choice
|
||||
else
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
//Sanitize
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
real_name = reject_bad_name(real_name)
|
||||
real_name = sanitizeName(real_name)
|
||||
|
||||
if(isnull(species) || !(species in playable_species))
|
||||
species = "Human"
|
||||
|
||||
@@ -453,13 +453,13 @@ BLIND // can't see anything
|
||||
A.attack_hand(user)
|
||||
return
|
||||
|
||||
if ((ishuman(usr) || ismonkey(usr)) && src.loc == user) //make it harder to accidentally undress yourself
|
||||
if ((ishuman(usr) || issmall(usr)) && src.loc == user) //make it harder to accidentally undress yourself
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/MouseDrop(obj/over_object as obj)
|
||||
if (ishuman(usr) || ismonkey(usr))
|
||||
if (ishuman(usr) || issmall(usr))
|
||||
//makes sure that the clothing is equipped so that we can't drag it into our hand from miles away.
|
||||
if (!(src.loc == usr))
|
||||
return
|
||||
|
||||
@@ -100,4 +100,35 @@
|
||||
body_parts_covered = HEAD|FACE|EYES
|
||||
w_class = 2
|
||||
var/voicechange = 0
|
||||
siemens_coefficient = 0.9
|
||||
siemens_coefficient = 0.9
|
||||
|
||||
/obj/item/clothing/mask/ai
|
||||
name = "camera MIU"
|
||||
desc = "Allows for direct mental connection to accessible camera networks."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja"
|
||||
flags_inv = HIDEFACE
|
||||
body_parts_covered = 0
|
||||
var/mob/eye/aiEye/eye
|
||||
|
||||
/obj/item/clothing/mask/ai/New()
|
||||
eye = new(src)
|
||||
|
||||
/obj/item/clothing/mask/ai/equipped(var/mob/user, var/slot)
|
||||
..(user, slot)
|
||||
if(slot == slot_wear_mask)
|
||||
eye.owner = user
|
||||
user.eyeobj = eye
|
||||
|
||||
for(var/datum/chunk/c in eye.visibleChunks)
|
||||
c.remove(eye)
|
||||
eye.setLoc(user)
|
||||
|
||||
/obj/item/clothing/mask/ai/dropped(var/mob/user)
|
||||
..()
|
||||
if(eye.owner == user)
|
||||
for(var/datum/chunk/c in eye.visibleChunks)
|
||||
c.remove(eye)
|
||||
|
||||
eye.owner.eyeobj = null
|
||||
eye.owner = null
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/voice = sanitize(copytext(name,1,MAX_MESSAGE_LEN))
|
||||
var/voice = sanitize(name, MAX_NAME_LEN)
|
||||
if(!voice || !length(voice)) return
|
||||
changer.voice = voice
|
||||
usr << "<span class='notice'>You are now mimicking <B>[changer.voice]</B>.</span>"
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
/obj/item/rig_module/chem_dispenser/ninja
|
||||
interface_desc = "Dispenses loaded chemicals directly into the wearer's bloodstream. This variant is made to be extremely light and flexible."
|
||||
|
||||
|
||||
//just over a syringe worth of each. Want more? Go refill. Gives the ninja another reason to have to show their face.
|
||||
charges = list(
|
||||
list("tricordrazine", "tricordrazine", 0, 20),
|
||||
@@ -280,10 +280,10 @@
|
||||
voice_holder.active = 0
|
||||
usr << "<font color='blue'>You disable the speech synthesiser.</font>"
|
||||
if("Set Name")
|
||||
var/raw_choice = input(usr, "Please enter a new name.") as text|null
|
||||
var/raw_choice = sanitize(input(usr, "Please enter a new name.") as text|null)
|
||||
if(!raw_choice)
|
||||
return 0
|
||||
voice_holder.voice = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
voice_holder.voice = raw_choice
|
||||
usr << "<font color='blue'>You are now mimicking <B>[voice_holder.voice]</B>.</font>"
|
||||
return 1
|
||||
|
||||
|
||||
@@ -688,27 +688,28 @@
|
||||
|
||||
//Todo
|
||||
/obj/item/weapon/rig/proc/malfunction()
|
||||
return 0
|
||||
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rig/emp_act(severity_class)
|
||||
//set malfunctioning
|
||||
if(emp_protection < 30) //for ninjas, really.
|
||||
malfunctioning += 10
|
||||
if(malfunction_delay <= 0)
|
||||
malfunction_delay = max(malfunction_delay, round(30/severity_class))
|
||||
|
||||
malfunction_delay = max(malfunction_delay, round(30/severity_class))
|
||||
|
||||
//drain some charge
|
||||
if(cell) cell.emp_act(severity_class + 15)
|
||||
|
||||
|
||||
//possibly damage some modules
|
||||
take_hit((100/severity_class), "electrical pulse", 1)
|
||||
take_hit((100/severity_class), "electrical pulse", 1)
|
||||
|
||||
/obj/item/weapon/rig/proc/shock(mob/user)
|
||||
if (electrocute_mob(user, cell, src))
|
||||
spark_system.start()
|
||||
return 1
|
||||
if(user.stunned)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/weapon/rig/proc/take_hit(damage, source, is_emp=0)
|
||||
|
||||
if(!installed_modules.len)
|
||||
@@ -720,7 +721,7 @@
|
||||
else
|
||||
//Want this to be roughly independant of the number of modules, meaning that X emp hits will disable Y% of the suit's modules on average.
|
||||
//that way people designing hardsuits don't have to worry (as much) about how adding that extra module will affect emp resiliance by 'soaking' hits for other modules
|
||||
chance = max(0, damage - emp_protection)*min(installed_modules.len/15, 1)
|
||||
chance = 2*max(0, damage - emp_protection)*min(installed_modules.len/15, 1)
|
||||
|
||||
if(!prob(chance))
|
||||
return
|
||||
@@ -740,7 +741,7 @@
|
||||
dam_module = pick(damaged_modules)
|
||||
else if(valid_modules.len)
|
||||
dam_module = pick(valid_modules)
|
||||
|
||||
|
||||
if(!dam_module) return
|
||||
|
||||
dam_module.damage++
|
||||
@@ -748,11 +749,11 @@
|
||||
if(!source)
|
||||
source = "hit"
|
||||
|
||||
if(wearer)
|
||||
if(wearer)
|
||||
if(dam_module.damage >= 2)
|
||||
wearer << "<span class='danger'>The [source] has disabled your [dam_module.interface_name]!"
|
||||
else
|
||||
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!"
|
||||
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!"
|
||||
dam_module.deactivate()
|
||||
|
||||
/obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user)
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
|
||||
slowdown = 0
|
||||
//will reach 10 breach damage after 18 laser carbine blasts, or 7 revolver hits. Completely immune to smg hits.
|
||||
breach_threshold = 28
|
||||
resilience = 0.05
|
||||
//will reach 10 breach damage after 25 laser carbine blasts, 3 revolver hits, or ~1 PTR hit. Completely immune to smg or sts hits.
|
||||
breach_threshold = 38
|
||||
resilience = 0.2
|
||||
can_breach = 1
|
||||
sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/suit.dmi',"Unathi" = 'icons/mob/species/unathi/suit.dmi')
|
||||
supporting_limbs = list()
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
/obj/item/clothing/suit/space/rig/light
|
||||
name = "suit"
|
||||
breach_threshold = 18 //comparable to voidsuits
|
||||
resilience = 0.2
|
||||
|
||||
/obj/item/clothing/gloves/rig/light
|
||||
name = "gloves"
|
||||
@@ -82,8 +81,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/space/rig/light/ninja
|
||||
breach_threshold = 28 //comparable to regular hardsuits
|
||||
resilience = 0.05
|
||||
breach_threshold = 38 //comparable to regular hardsuits
|
||||
|
||||
/obj/item/weapon/rig/light/stealth
|
||||
name = "stealth suit control module"
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
if("logout")
|
||||
authenticated = 0
|
||||
if("filter")
|
||||
var/filterstr = stripped_input(usr,"Input the search criteria. Multiple values can be input, separated by a comma.", "Filter setting") as text|null
|
||||
var/filterstr = sanitize(input("Input the search criteria. Multiple values can be input, separated by a comma.", "Filter setting") as text|null)
|
||||
if(filterstr)
|
||||
filters[href_list["filter"]] = text2list(filterstr,",")
|
||||
else
|
||||
@@ -243,7 +243,7 @@
|
||||
current = null
|
||||
if("label")
|
||||
if(current)
|
||||
var/label = stripped_input(usr,"Input the label for this record. Multiple values can be input, separated by a comma.", "Labeling record", current.fields["label"]) as text|null
|
||||
var/label = sanitize(input(usr,"Input the label for this record. Multiple values can be input, separated by a comma.", "Labeling record", current.fields["label"]) as text|null)
|
||||
current.fields["label"] = label
|
||||
if("object")
|
||||
if(scanning)
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
if("change_id")
|
||||
var/attempt_code = text2num(input("Re-enter the current EFTPOS access code", "Confirm EFTPOS code"))
|
||||
if(attempt_code == access_code)
|
||||
eftpos_name = input("Enter a new terminal ID for this device", "Enter new EFTPOS ID") + " EFTPOS scanner"
|
||||
eftpos_name = sanitize(input("Enter a new terminal ID for this device", "Enter new EFTPOS ID")) + " EFTPOS scanner"
|
||||
print_reference()
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Incorrect code entered.</span>"
|
||||
@@ -182,7 +182,7 @@
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Account not found.</span>"
|
||||
if("trans_purpose")
|
||||
var/choice = input("Enter reason for EFTPOS transaction", "Transaction purpose")
|
||||
var/choice = sanitize(input("Enter reason for EFTPOS transaction", "Transaction purpose"))
|
||||
if(choice) transaction_purpose = choice
|
||||
if("trans_value")
|
||||
var/try_num = input("Enter amount for EFTPOS transaction", "Transaction amount") as num
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
else if(href_list["back"])
|
||||
selected_event_container = null
|
||||
else if(href_list["set_name"])
|
||||
var/name = input("Enter event name.", "Set Name") as text|null
|
||||
var/name = sanitize(input("Enter event name.", "Set Name") as text|null)
|
||||
if(name)
|
||||
var/datum/event_meta/EM = locate(href_list["set_name"])
|
||||
EM.name = name
|
||||
|
||||
@@ -49,8 +49,6 @@
|
||||
else
|
||||
randmutg(H) // Applies good mutation
|
||||
domutcheck(H,null,MUTCHK_FORCED)
|
||||
else if(istype(C,/mob/living/carbon/monkey))
|
||||
C.apply_effect((rand(5,25)),IRRADIATE,0)
|
||||
|
||||
/datum/event/radiation_storm/end()
|
||||
revoke_maint_all_access()
|
||||
|
||||
@@ -66,7 +66,9 @@ var/global/datum/controller/plants/plant_controller // Set in New().
|
||||
plant_sprites[base] = ikey
|
||||
|
||||
for(var/icostate in icon_states('icons/obj/hydroponics_products.dmi'))
|
||||
plant_product_sprites |= icostate
|
||||
var/split = findtext(icostate,"-")
|
||||
if(split)
|
||||
plant_product_sprites |= copytext(icostate,1,split)
|
||||
|
||||
// Populate the global seed datum list.
|
||||
for(var/type in typesof(/datum/seed)-/datum/seed)
|
||||
|
||||
@@ -12,6 +12,8 @@ var/global/list/plant_seed_sprites = list()
|
||||
var/modified = 0
|
||||
|
||||
/obj/item/seeds/New()
|
||||
while(!plant_controller)
|
||||
sleep(30)
|
||||
update_seed()
|
||||
..()
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
O.loc = src
|
||||
update_icon()
|
||||
else if(istype(O, /obj/item/weapon/pen))
|
||||
var/newname = stripped_input(usr, "What would you like to title this bookshelf?")
|
||||
var/newname = sanitizeSafe(input("What would you like to title this bookshelf?"), MAX_MESSAGE_LEN)
|
||||
if(!newname)
|
||||
return
|
||||
else
|
||||
name = ("bookcase ([sanitize(newname)])")
|
||||
name = ("bookcase ([newname])")
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel")
|
||||
switch(choice)
|
||||
if("Title")
|
||||
var/newtitle = reject_bad_text(stripped_input(usr, "Write a new title:"))
|
||||
var/newtitle = reject_bad_text(sanitizeSafe(input("Write a new title:")))
|
||||
if(!newtitle)
|
||||
usr << "The title is invalid."
|
||||
return
|
||||
@@ -182,14 +182,14 @@
|
||||
src.name = newtitle
|
||||
src.title = newtitle
|
||||
if("Contents")
|
||||
var/content = strip_html(input(usr, "Write your book's contents (HTML NOT allowed):"),8192) as message|null
|
||||
var/content = sanitize(input("Write your book's contents (HTML NOT allowed):") as message|null, MAX_BOOK_MESSAGE_LEN)
|
||||
if(!content)
|
||||
usr << "The content is invalid."
|
||||
return
|
||||
else
|
||||
src.dat += content
|
||||
if("Author")
|
||||
var/newauthor = stripped_input(usr, "Write the author's name:")
|
||||
var/newauthor = sanitize(input(usr, "Write the author's name:"))
|
||||
if(!newauthor)
|
||||
usr << "The name is invalid."
|
||||
return
|
||||
|
||||
@@ -300,12 +300,12 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
if(checkoutperiod < 1)
|
||||
checkoutperiod = 1
|
||||
if(href_list["editbook"])
|
||||
buffer_book = sanitize(copytext(input("Enter the book's title:") as text|null,1,MAX_MESSAGE_LEN))
|
||||
buffer_book = sanitizeSafe(input("Enter the book's title:") as text|null)
|
||||
if(href_list["editmob"])
|
||||
buffer_mob = sanitize(copytext(input("Enter the recipient's name:") as text|null,1,MAX_NAME_LEN))
|
||||
buffer_mob = sanitize(input("Enter the recipient's name:") as text|null, MAX_NAME_LEN)
|
||||
if(href_list["checkout"])
|
||||
var/datum/borrowbook/b = new /datum/borrowbook
|
||||
b.bookname = sanitize(buffer_book)
|
||||
b.bookname = sanitizeSafe(buffer_book)
|
||||
b.mobname = sanitize(buffer_mob)
|
||||
b.getdate = world.time
|
||||
b.duedate = world.time + (checkoutperiod * 600)
|
||||
@@ -317,7 +317,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/obj/item/weapon/book/b = locate(href_list["delbook"])
|
||||
inventory.Remove(b)
|
||||
if(href_list["setauthor"])
|
||||
var/newauthor = sanitize(copytext(input("Enter the author's name: ") as text|null,1,MAX_MESSAGE_LEN))
|
||||
var/newauthor = sanitize(input("Enter the author's name: ") as text|null)
|
||||
if(newauthor)
|
||||
scanner.cache.author = newauthor
|
||||
if(href_list["setcategory"])
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
var/supported = 0
|
||||
var/active = 0
|
||||
var/list/resource_field = list()
|
||||
var/open = 0
|
||||
|
||||
var/ore_types = list(
|
||||
"iron" = /obj/item/weapon/ore/iron,
|
||||
@@ -30,10 +29,10 @@
|
||||
)
|
||||
|
||||
//Upgrades
|
||||
var/obj/item/weapon/stock_parts/matter_bin/storage
|
||||
var/obj/item/weapon/stock_parts/micro_laser/cutter
|
||||
var/obj/item/weapon/stock_parts/capacitor/cellmount
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/harvest_speed
|
||||
var/capacity
|
||||
var/charge_use
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
|
||||
//Flags
|
||||
var/need_update_field = 0
|
||||
@@ -43,13 +42,14 @@
|
||||
|
||||
..()
|
||||
|
||||
storage = new(src)
|
||||
cutter = new(src)
|
||||
cellmount = new(src)
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/miningdrill(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/weapon/cell/high(src)
|
||||
|
||||
cell = new(src)
|
||||
cell.maxcharge = 10000
|
||||
cell.charge = cell.maxcharge
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/mining/drill/process()
|
||||
|
||||
@@ -74,11 +74,11 @@
|
||||
return
|
||||
|
||||
//Drill through the flooring, if any.
|
||||
if(istype(get_turf(src),/turf/simulated/floor/plating/airless/asteroid))
|
||||
if(istype(get_turf(src), /turf/simulated/floor/plating/airless/asteroid))
|
||||
var/turf/simulated/floor/plating/airless/asteroid/T = get_turf(src)
|
||||
if(!T.dug)
|
||||
T.gets_dug()
|
||||
else if(istype(get_turf(src),/turf/simulated/floor))
|
||||
else if(istype(get_turf(src), /turf/simulated/floor))
|
||||
var/turf/simulated/floor/T = get_turf(src)
|
||||
T.ex_act(2.0)
|
||||
|
||||
@@ -94,20 +94,20 @@
|
||||
|
||||
if(!harvesting) return
|
||||
|
||||
var/total_harvest = get_harvest_capacity() //Ore harvest-per-tick.
|
||||
var/total_harvest = harvest_speed //Ore harvest-per-tick.
|
||||
var/found_resource = 0 //If this doesn't get set, the area is depleted and the drill errors out.
|
||||
|
||||
for(var/metal in ore_types)
|
||||
|
||||
if(contents.len >= get_storage_capacity())
|
||||
if(contents.len >= capacity)
|
||||
system_error("insufficient storage space")
|
||||
active = 0
|
||||
need_player_check = 1
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(contents.len + total_harvest >= get_storage_capacity())
|
||||
total_harvest = get_storage_capacity() - contents.len
|
||||
if(contents.len + total_harvest >= capacity)
|
||||
total_harvest = capacity - contents.len
|
||||
|
||||
if(total_harvest <= 0) break
|
||||
if(harvesting.resources[metal])
|
||||
@@ -124,7 +124,7 @@
|
||||
create_ore = harvesting.resources[metal]
|
||||
harvesting.resources[metal] = 0
|
||||
|
||||
for(var/i=1,i<=create_ore,i++)
|
||||
for(var/i=1, i <= create_ore, i++)
|
||||
var/oretype = ore_types[metal]
|
||||
new oretype(src)
|
||||
|
||||
@@ -140,93 +140,56 @@
|
||||
/obj/machinery/mining/drill/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/mining/drill/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(active) return
|
||||
open = !open
|
||||
user << "\blue You [open ? "open" : "close"] the maintenance panel." //TODO: Sprite.
|
||||
/obj/machinery/mining/drill/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(!active)
|
||||
if(default_deconstruction_screwdriver(user, O))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, O))
|
||||
return
|
||||
if(default_part_replacement(user, O))
|
||||
return
|
||||
if(!panel_open || active) return ..()
|
||||
|
||||
if(istype(O, /obj/item/weapon/cell))
|
||||
if(cell)
|
||||
user << "The drill already has a cell installed."
|
||||
else
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
cell = O
|
||||
component_parts += O
|
||||
user << "You install \the [O]."
|
||||
return
|
||||
else
|
||||
if(!open || active) return ..()
|
||||
if(istype(W,/obj/item/weapon/crowbar))
|
||||
if(cell)
|
||||
user << "You pry out \the [cell]."
|
||||
cell.loc = get_turf(src)
|
||||
cell = null
|
||||
else if(storage)
|
||||
user << "You slip the bolt and pry out \the [storage]."
|
||||
storage.loc = get_turf(src)
|
||||
storage = null
|
||||
else if(cutter)
|
||||
user << "You carefully detatch and pry out \the [cutter]."
|
||||
cutter.loc = get_turf(src)
|
||||
cutter = null
|
||||
else if(cellmount)
|
||||
user << "You yank out a few wires and pry out \the [cellmount]."
|
||||
cellmount.loc = get_turf(src)
|
||||
cellmount = null
|
||||
else
|
||||
user << "There's nothing inside the drilling rig to remove."
|
||||
return
|
||||
else if(istype(W,/obj/item/weapon/stock_parts/matter_bin))
|
||||
if(storage)
|
||||
user << "The drill already has a matter bin installed."
|
||||
else
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
storage = W
|
||||
user << "You install \the [W]."
|
||||
return
|
||||
else if(istype(W,/obj/item/weapon/stock_parts/micro_laser))
|
||||
if(cutter)
|
||||
user << "The drill already has a cutting head installed."
|
||||
else
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cutter = W
|
||||
user << "You install \the [W]."
|
||||
return
|
||||
else if(istype(W,/obj/item/weapon/stock_parts/capacitor))
|
||||
if(cellmount)
|
||||
user << "The drill already has a cell capacitor installed."
|
||||
else
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cellmount = W
|
||||
user << "You install \the [W]."
|
||||
return
|
||||
else if(istype(W,/obj/item/weapon/cell))
|
||||
if(cell)
|
||||
user << "The drill already has a cell installed."
|
||||
else
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cell = W
|
||||
user << "You install \the [W]."
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/mining/drill/attack_hand(mob/user as mob)
|
||||
check_supports()
|
||||
|
||||
if(need_player_check)
|
||||
if (panel_open && cell)
|
||||
user << "You take out \the [cell]."
|
||||
cell.loc = get_turf(user)
|
||||
component_parts -= cell
|
||||
cell = null
|
||||
return
|
||||
else if(need_player_check)
|
||||
user << "You hit the manual override and reset the drill's error checking."
|
||||
need_player_check = 0
|
||||
if(anchored) get_resource_field()
|
||||
if(anchored)
|
||||
get_resource_field()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else if(supported)
|
||||
else if(supported && !panel_open)
|
||||
if(use_cell_power())
|
||||
active = !active
|
||||
if(active)
|
||||
user << "\blue You engage \the [src] and it lurches downwards, grinding noisily."
|
||||
visible_message("<span class='notice'>\The [src] lurches downwards, grinding noisily.</span>")
|
||||
need_update_field = 1
|
||||
else
|
||||
user << "\blue You disengage \the [src] and it shudders to a grinding halt."
|
||||
visible_message("<span class='notice'>\The [src] shudders to a grinding halt.</span>")
|
||||
else
|
||||
user << "\blue The drill is unpowered."
|
||||
user << "<span class='notice'>The drill is unpowered.</span>"
|
||||
else
|
||||
user << "\blue Turning on a piece of industrial machinery without sufficient bracing is a bad idea."
|
||||
user << "<span class='notice'>Turning on a piece of industrial machinery without sufficient bracing or wires exposed is a bad idea.</span>"
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -241,6 +204,21 @@
|
||||
icon_state = "mining_drill"
|
||||
return
|
||||
|
||||
/obj/machinery/mining/drill/RefreshParts()
|
||||
..()
|
||||
harvest_speed = 0
|
||||
capacity = 0
|
||||
charge_use = 50
|
||||
|
||||
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||
if(istype(P, /obj/item/weapon/stock_parts/micro_laser))
|
||||
harvest_speed = P.rating
|
||||
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
|
||||
capacity = 200 * P.rating
|
||||
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
||||
charge_use -= 10 * P.rating
|
||||
cell = locate(/obj/item/weapon/cell) in component_parts
|
||||
|
||||
/obj/machinery/mining/drill/proc/check_supports()
|
||||
|
||||
supported = 0
|
||||
@@ -259,20 +237,12 @@
|
||||
|
||||
/obj/machinery/mining/drill/proc/system_error(var/error)
|
||||
|
||||
if(error) src.visible_message("\red \The [src] flashes a '[error]' warning.")
|
||||
if(error)
|
||||
src.visible_message("<span class='notice'>\The [src] flashes a '[error]' warning.</span>")
|
||||
need_player_check = 1
|
||||
active = 0
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/mining/drill/proc/get_harvest_capacity()
|
||||
return (cutter ? cutter.rating : 0)
|
||||
|
||||
/obj/machinery/mining/drill/proc/get_storage_capacity()
|
||||
return 200 * (storage ? storage.rating : 0)
|
||||
|
||||
/obj/machinery/mining/drill/proc/get_charge_use()
|
||||
return 50 - (10 * (cellmount ? cellmount.rating : 0))
|
||||
|
||||
/obj/machinery/mining/drill/proc/get_resource_field()
|
||||
|
||||
resource_field = list()
|
||||
@@ -281,13 +251,13 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T)) return
|
||||
|
||||
var/tx = T.x-2
|
||||
var/ty = T.y-2
|
||||
var/tx = T.x - 2
|
||||
var/ty = T.y - 2
|
||||
var/turf/mine_turf
|
||||
for(var/iy=0,iy<5,iy++)
|
||||
for(var/ix=0,ix<5,ix++)
|
||||
mine_turf = locate(tx+ix,ty+iy,T.z)
|
||||
if(mine_turf && istype(mine_turf) && mine_turf.has_resources)
|
||||
for(var/iy = 0,iy < 5, iy++)
|
||||
for(var/ix = 0, ix < 5, ix++)
|
||||
mine_turf = locate(tx + ix, ty + iy, T.z)
|
||||
if(mine_turf && mine_turf.has_resources)
|
||||
resource_field += mine_turf
|
||||
|
||||
if(!resource_field.len)
|
||||
@@ -295,9 +265,8 @@
|
||||
|
||||
/obj/machinery/mining/drill/proc/use_cell_power()
|
||||
if(!cell) return 0
|
||||
var/req = get_charge_use()
|
||||
if(cell.charge >= req)
|
||||
cell.use(req)
|
||||
if(cell.charge >= charge_use)
|
||||
cell.use(charge_use)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -312,9 +281,9 @@
|
||||
if(B)
|
||||
for(var/obj/item/weapon/ore/O in contents)
|
||||
O.loc = B
|
||||
usr << "\red You unload the drill's storage cache into the ore box."
|
||||
usr << "<span class='notice'>You unload the drill's storage cache into the ore box.</span>"
|
||||
else
|
||||
usr << "\red You must move an ore box up to the drill before you can unload it."
|
||||
usr << "<span class='notice'>You must move an ore box up to the drill before you can unload it.</span>"
|
||||
|
||||
|
||||
/obj/machinery/mining/brace
|
||||
@@ -326,16 +295,16 @@
|
||||
/obj/machinery/mining/brace/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/wrench))
|
||||
|
||||
if(istype(get_turf(src),/turf/space))
|
||||
user << "\blue You can't anchor something to empty space. Idiot."
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
user << "<span class='notice'>You can't anchor something to empty space. Idiot.</span>"
|
||||
return
|
||||
|
||||
if(connected && connected.active)
|
||||
user << "\blue You can't unanchor the brace of a running drill!"
|
||||
user << "<span class='notice'>You can't unanchor the brace of a running drill!</span>"
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "\blue You [anchored ? "un" : ""]anchor the brace."
|
||||
user << "<span class='notice'>You [anchored ? "un" : ""]anchor the brace.</span>"
|
||||
|
||||
anchored = !anchored
|
||||
if(anchored)
|
||||
@@ -347,18 +316,16 @@
|
||||
|
||||
var/turf/T = get_step(get_turf(src), src.dir)
|
||||
|
||||
if(!T.has_resources)
|
||||
src.visible_message("\red The terrain near the brace is unsuitable!")
|
||||
return
|
||||
|
||||
for(var/thing in T.contents)
|
||||
if(istype(thing,/obj/machinery/mining/drill))
|
||||
if(istype(thing, /obj/machinery/mining/drill))
|
||||
connected = thing
|
||||
break
|
||||
|
||||
if(!connected) return
|
||||
if(!connected)
|
||||
return
|
||||
|
||||
if(!connected.supports) connected.supports = list()
|
||||
if(!connected.supports)
|
||||
connected.supports = list()
|
||||
|
||||
icon_state = "mining_brace_active"
|
||||
|
||||
|
||||
@@ -5,16 +5,13 @@
|
||||
icon_state = "forensic0-old" //GET A BETTER SPRITE.
|
||||
item_state = "electronic"
|
||||
matter = list("metal" = 150)
|
||||
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
|
||||
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
|
||||
|
||||
user << "You begin sweeping \the [src] about, scanning for metal deposits."
|
||||
|
||||
if(!do_after(user,50)) return
|
||||
|
||||
if(!user || !src) return
|
||||
if(!do_after(user, 50))
|
||||
return
|
||||
|
||||
var/list/metals = list(
|
||||
"surface minerals" = 0,
|
||||
@@ -23,32 +20,30 @@
|
||||
"exotic matter" = 0
|
||||
)
|
||||
|
||||
for(var/turf/T in range(3,get_turf(user)))
|
||||
for(var/turf/T in range(2, get_turf(user)))
|
||||
|
||||
if(!T.has_resources)
|
||||
continue
|
||||
|
||||
for(var/metal in T.resources)
|
||||
|
||||
var/ore_type
|
||||
|
||||
switch(metal)
|
||||
if("silicates" || "carbonaceous rock" || "iron") ore_type = "surface minerals"
|
||||
if("gold" || "silver" || "diamond") ore_type = "precious metals"
|
||||
if("uranium") ore_type = "nuclear fuel"
|
||||
if("phoron" || "osmium" || "hydrogen") ore_type = "exotic matter"
|
||||
if("silicates", "carbonaceous rock", "iron") ore_type = "surface minerals"
|
||||
if("gold", "silver", "diamond") ore_type = "precious metals"
|
||||
if("uranium") ore_type = "nuclear fuel"
|
||||
if("phoron", "osmium", "hydrogen") ore_type = "exotic matter"
|
||||
|
||||
if(ore_type) metals[ore_type] += T.resources[metal]
|
||||
|
||||
user << "\icon[src] \blue The scanner beeps and displays a readout."
|
||||
user << "\icon[src] <span class='notice'>The scanner beeps and displays a readout.</span>"
|
||||
|
||||
for(var/ore_type in metals)
|
||||
|
||||
var/result = "no sign"
|
||||
|
||||
switch(metals[ore_type])
|
||||
if(1 to 50) result = "trace amounts"
|
||||
if(51 to 150) result = "significant amounts"
|
||||
if(151 to INFINITY) result = "huge quantities"
|
||||
if(1 to 25) result = "trace amounts"
|
||||
if(26 to 75) result = "significant amounts"
|
||||
if(76 to INFINITY) result = "huge quantities"
|
||||
|
||||
user << "- [result] of [ore_type]."
|
||||
@@ -533,7 +533,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
var/max_length = 50
|
||||
|
||||
var/message = stripped_input(src,"Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")
|
||||
var/message = sanitize(input("Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
|
||||
|
||||
if (message)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/dead/observer/say(var/message)
|
||||
message = strip_html_properly(message)
|
||||
message = sanitize(message)
|
||||
|
||||
if (!message)
|
||||
return
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
/mob/dead/observer/emote(var/act, var/type, var/message)
|
||||
message = trim_strip_html_properly(message)
|
||||
message = sanitize(message)
|
||||
|
||||
if(!message)
|
||||
return
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
var/input
|
||||
if(!message)
|
||||
input = sanitize(copytext(input(src,"Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
|
||||
input = sanitize(input(src,"Choose an emote to display.") as text|null)
|
||||
else
|
||||
input = message
|
||||
if(input)
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
var/input
|
||||
if(!message)
|
||||
input = sanitize(copytext(input(src, "Choose an emote to display.") as text|null, 1, MAX_MESSAGE_LEN))
|
||||
input = sanitize(input(src, "Choose an emote to display.") as text|null)
|
||||
else
|
||||
input = message
|
||||
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
#define UPDATE_BUFFER 25 // 2.5 seconds
|
||||
|
||||
// CHUNK
|
||||
//
|
||||
// A 16x16 grid of the map with a list of turfs that can be seen, are visible and are dimmed.
|
||||
// Allows the Eye to stream these chunks and know what it can and cannot see.
|
||||
|
||||
/datum/obfuscation
|
||||
var/icon = 'icons/effects/cameravis.dmi'
|
||||
var/icon_state = "black"
|
||||
|
||||
/datum/chunk
|
||||
var/list/obscuredTurfs = list()
|
||||
var/list/visibleTurfs = list()
|
||||
var/list/obscured = list()
|
||||
var/list/turfs = list()
|
||||
var/list/seenby = list()
|
||||
var/visible = 0
|
||||
var/changed = 0
|
||||
var/updating = 0
|
||||
var/x = 0
|
||||
var/y = 0
|
||||
var/z = 0
|
||||
var/datum/obfuscation/obfuscation = new()
|
||||
|
||||
// Add an eye to the chunk, then update if changed.
|
||||
|
||||
/datum/chunk/proc/add(mob/eye/eye)
|
||||
if(!eye.owner)
|
||||
return
|
||||
eye.visibleChunks += src
|
||||
if(eye.owner.client)
|
||||
eye.owner.client.images += obscured
|
||||
visible++
|
||||
seenby += eye
|
||||
if(changed && !updating)
|
||||
update()
|
||||
|
||||
// Remove an eye from the chunk, then update if changed.
|
||||
|
||||
/datum/chunk/proc/remove(mob/eye/eye)
|
||||
if(!eye.owner)
|
||||
return
|
||||
eye.visibleChunks -= src
|
||||
if(eye.owner.client)
|
||||
eye.owner.client.images -= obscured
|
||||
seenby -= eye
|
||||
if(visible > 0)
|
||||
visible--
|
||||
|
||||
// Called when a chunk has changed. I.E: A wall was deleted.
|
||||
|
||||
/datum/chunk/proc/visibilityChanged(turf/loc)
|
||||
if(!visibleTurfs[loc])
|
||||
return
|
||||
hasChanged()
|
||||
|
||||
// Updates the chunk, makes sure that it doesn't update too much. If the chunk isn't being watched it will
|
||||
// instead be flagged to update the next time an AI Eye moves near it.
|
||||
|
||||
/datum/chunk/proc/hasChanged(var/update_now = 0)
|
||||
if(visible || update_now)
|
||||
if(!updating)
|
||||
updating = 1
|
||||
spawn(UPDATE_BUFFER) // Batch large changes, such as many doors opening or closing at once
|
||||
update()
|
||||
updating = 0
|
||||
else
|
||||
changed = 1
|
||||
|
||||
// The actual updating.
|
||||
|
||||
/datum/chunk/proc/update()
|
||||
|
||||
set background = 1
|
||||
|
||||
var/list/newVisibleTurfs = new()
|
||||
acquireVisibleTurfs(newVisibleTurfs)
|
||||
|
||||
// Removes turf that isn't in turfs.
|
||||
newVisibleTurfs &= turfs
|
||||
|
||||
var/list/visAdded = newVisibleTurfs - visibleTurfs
|
||||
var/list/visRemoved = visibleTurfs - newVisibleTurfs
|
||||
|
||||
visibleTurfs = newVisibleTurfs
|
||||
obscuredTurfs = turfs - newVisibleTurfs
|
||||
|
||||
for(var/turf in visAdded)
|
||||
var/turf/t = turf
|
||||
if(t.obfuscations[obfuscation.type])
|
||||
obscured -= t.obfuscations[obfuscation.type]
|
||||
for(var/eye in seenby)
|
||||
var/mob/eye/m = eye
|
||||
if(!m || !m.owner)
|
||||
continue
|
||||
if(m.owner.client)
|
||||
m.owner.client.images -= t.obfuscations[obfuscation.type]
|
||||
|
||||
for(var/turf in visRemoved)
|
||||
var/turf/t = turf
|
||||
if(obscuredTurfs[t])
|
||||
if(!t.obfuscations[obfuscation.type])
|
||||
t.obfuscations[obfuscation.type] = image(obfuscation.icon, t, obfuscation.icon_state, 15)
|
||||
|
||||
obscured += t.obfuscations[obfuscation.type]
|
||||
for(var/eye in seenby)
|
||||
var/mob/eye/m = eye
|
||||
if(!m || !m.owner)
|
||||
seenby -= m
|
||||
continue
|
||||
if(m.owner.client)
|
||||
m.owner.client.images += t.obfuscations[obfuscation.type]
|
||||
|
||||
/datum/chunk/proc/acquireVisibleTurfs(var/list/visible)
|
||||
|
||||
// Create a new camera chunk, since the chunks are made as they are needed.
|
||||
|
||||
/datum/chunk/New(loc, x, y, z)
|
||||
|
||||
// 0xf = 15
|
||||
x &= ~0xf
|
||||
y &= ~0xf
|
||||
|
||||
src.x = x
|
||||
src.y = y
|
||||
src.z = z
|
||||
|
||||
for(var/turf/t in range(10, locate(x + 8, y + 8, z)))
|
||||
if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16)
|
||||
turfs[t] = t
|
||||
|
||||
acquireVisibleTurfs(visibleTurfs)
|
||||
|
||||
// Removes turf that isn't in turfs.
|
||||
visibleTurfs &= turfs
|
||||
|
||||
obscuredTurfs = turfs - visibleTurfs
|
||||
|
||||
for(var/turf in obscuredTurfs)
|
||||
var/turf/t = turf
|
||||
if(!t.obfuscations[obfuscation.type])
|
||||
t.obfuscations[obfuscation.type] = image(obfuscation.icon, t, obfuscation.icon_state, 15)
|
||||
obscured += t.obfuscations[obfuscation.type]
|
||||
|
||||
#undef UPDATE_BUFFER
|
||||
@@ -0,0 +1,103 @@
|
||||
// EYE
|
||||
//
|
||||
// A mob that another mob controls to look around the station with.
|
||||
// It streams chunks as it moves around, which will show it what the controller can and cannot see.
|
||||
|
||||
/mob/eye
|
||||
name = "Eye"
|
||||
icon = 'icons/mob/eye.dmi'
|
||||
icon_state = "default-eye"
|
||||
alpha = 127
|
||||
|
||||
var/sprint = 10
|
||||
var/cooldown = 0
|
||||
var/acceleration = 1
|
||||
|
||||
see_in_dark = 7
|
||||
status_flags = GODMODE
|
||||
invisibility = INVISIBILITY_EYE
|
||||
|
||||
var/mob/owner = null
|
||||
var/list/visibleChunks = list()
|
||||
|
||||
var/ghostimage = null
|
||||
var/datum/visualnet/visualnet
|
||||
|
||||
/mob/eye/New()
|
||||
ghostimage = image(src.icon,src,src.icon_state)
|
||||
ghost_darkness_images |= ghostimage //so ghosts can see the eye when they disable darkness
|
||||
ghost_sightless_images |= ghostimage //so ghosts can see the eye when they disable ghost sight
|
||||
updateallghostimages()
|
||||
..()
|
||||
|
||||
mob/eye/Del()
|
||||
if (ghostimage)
|
||||
ghost_darkness_images -= ghostimage
|
||||
ghost_sightless_images -= ghostimage
|
||||
del(ghostimage)
|
||||
ghostimage = null;
|
||||
updateallghostimages()
|
||||
..()
|
||||
|
||||
// Movement code. Returns 0 to stop air movement from moving it.
|
||||
/mob/eye/Move()
|
||||
return 0
|
||||
|
||||
/mob/eye/examinate()
|
||||
set popup_menu = 0
|
||||
set src = usr.contents
|
||||
return 0
|
||||
|
||||
/mob/eye/pointed()
|
||||
set popup_menu = 0
|
||||
set src = usr.contents
|
||||
return 0
|
||||
|
||||
/mob/eye/examine(mob/user)
|
||||
|
||||
// Use this when setting the eye's location.
|
||||
// It will also stream the chunk that the new loc is in.
|
||||
/mob/eye/proc/setLoc(var/T)
|
||||
if(owner)
|
||||
T = get_turf(T)
|
||||
loc = T
|
||||
|
||||
if(owner.client)
|
||||
owner.client.eye = src
|
||||
|
||||
visualnet.visibility(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/eye/EyeMove(n, direct)
|
||||
var/initial = initial(sprint)
|
||||
var/max_sprint = 50
|
||||
|
||||
if(cooldown && cooldown < world.timeofday)
|
||||
sprint = initial
|
||||
|
||||
for(var/i = 0; i < max(sprint, initial); i += 20)
|
||||
var/turf/step = get_turf(get_step(src, direct))
|
||||
if(step)
|
||||
setLoc(step)
|
||||
|
||||
cooldown = world.timeofday + 5
|
||||
if(acceleration)
|
||||
sprint = min(sprint + 0.5, max_sprint)
|
||||
else
|
||||
sprint = initial
|
||||
|
||||
/mob/eye/proc/getLoc()
|
||||
if(owner)
|
||||
if(!isturf(owner.loc) || !owner.client)
|
||||
return
|
||||
return loc
|
||||
|
||||
/mob
|
||||
var/mob/eye/eyeobj
|
||||
|
||||
/mob/proc/EyeMove(n, direct)
|
||||
if(!eyeobj)
|
||||
return
|
||||
|
||||
return eyeobj.EyeMove(n, direct)
|
||||
@@ -0,0 +1,53 @@
|
||||
//UPDATE TRIGGERS, when the chunk (and the surrounding chunks) should update.
|
||||
|
||||
// TURFS
|
||||
|
||||
/proc/updateVisibility(atom/A, var/opacity_check = 1)
|
||||
if(ticker)
|
||||
for(var/datum/visualnet/VN in visual_nets)
|
||||
VN.updateVisibility(A, opacity_check)
|
||||
|
||||
/turf
|
||||
var/list/image/obfuscations = new()
|
||||
|
||||
/turf/drain_power()
|
||||
return -1
|
||||
|
||||
/turf/simulated/Del()
|
||||
updateVisibility(src)
|
||||
..()
|
||||
|
||||
/turf/simulated/New()
|
||||
..()
|
||||
updateVisibility(src)
|
||||
|
||||
|
||||
// STRUCTURES
|
||||
|
||||
/obj/structure/Del()
|
||||
updateVisibility(src)
|
||||
..()
|
||||
|
||||
/obj/structure/New()
|
||||
..()
|
||||
updateVisibility(src)
|
||||
|
||||
// EFFECTS
|
||||
|
||||
/obj/effect/Del()
|
||||
updateVisibility(src)
|
||||
..()
|
||||
|
||||
/obj/effect/New()
|
||||
..()
|
||||
updateVisibility(src)
|
||||
|
||||
// DOORS
|
||||
|
||||
// Simply updates the visibility of the area when it opens/closes/destroyed.
|
||||
/obj/machinery/door/update_nearby_tiles(need_rebuild)
|
||||
. = ..(need_rebuild)
|
||||
// Glass door glass = 1
|
||||
// don't check then?
|
||||
if(!glass)
|
||||
updateVisibility(src, 0)
|
||||
@@ -0,0 +1,133 @@
|
||||
// VISUAL NET
|
||||
//
|
||||
// The datum containing all the chunks.
|
||||
|
||||
var/global/list/visual_nets = new()
|
||||
|
||||
/datum/visualnet
|
||||
// The chunks of the map, mapping the areas that an object can see.
|
||||
var/list/chunks = list()
|
||||
var/ready = 0
|
||||
var/chunk_type = /datum/chunk
|
||||
|
||||
/datum/visualnet/New()
|
||||
..()
|
||||
visual_nets += src
|
||||
|
||||
/datum/visualnet/Del()
|
||||
visual_nets -= src
|
||||
..()
|
||||
|
||||
// Checks if a chunk has been Generated in x, y, z.
|
||||
/datum/visualnet/proc/chunkGenerated(x, y, z)
|
||||
x &= ~0xf
|
||||
y &= ~0xf
|
||||
var/key = "[x],[y],[z]"
|
||||
return (chunks[key])
|
||||
|
||||
// Returns the chunk in the x, y, z.
|
||||
// If there is no chunk, it creates a new chunk and returns that.
|
||||
/datum/visualnet/proc/getChunk(x, y, z)
|
||||
x &= ~0xf
|
||||
y &= ~0xf
|
||||
var/key = "[x],[y],[z]"
|
||||
if(!chunks[key])
|
||||
chunks[key] = new chunk_type(null, x, y, z)
|
||||
|
||||
return chunks[key]
|
||||
|
||||
// Updates what the aiEye can see. It is recommended you use this when the aiEye moves or it's location is set.
|
||||
|
||||
/datum/visualnet/proc/visibility(mob/eye/eye)
|
||||
// 0xf = 15
|
||||
var/x1 = max(0, eye.x - 16) & ~0xf
|
||||
var/y1 = max(0, eye.y - 16) & ~0xf
|
||||
var/x2 = min(world.maxx, eye.x + 16) & ~0xf
|
||||
var/y2 = min(world.maxy, eye.y + 16) & ~0xf
|
||||
|
||||
var/list/visibleChunks = list()
|
||||
|
||||
for(var/x = x1; x <= x2; x += 16)
|
||||
for(var/y = y1; y <= y2; y += 16)
|
||||
visibleChunks += getChunk(x, y, eye.z)
|
||||
|
||||
var/list/remove = eye.visibleChunks - visibleChunks
|
||||
var/list/add = visibleChunks - eye.visibleChunks
|
||||
|
||||
for(var/chunk in remove)
|
||||
var/datum/chunk/c = chunk
|
||||
c.remove(eye)
|
||||
|
||||
for(var/chunk in add)
|
||||
var/datum/chunk/c = chunk
|
||||
c.add(eye)
|
||||
|
||||
// Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open.
|
||||
|
||||
/datum/visualnet/proc/updateVisibility(atom/A, var/opacity_check = 1)
|
||||
|
||||
if(!ticker || (opacity_check && !A.opacity))
|
||||
return
|
||||
majorChunkChange(A, 2)
|
||||
|
||||
/datum/visualnet/proc/updateChunk(x, y, z)
|
||||
// 0xf = 15
|
||||
if(!chunkGenerated(x, y, z))
|
||||
return
|
||||
var/datum/chunk/chunk = getChunk(x, y, z)
|
||||
chunk.hasChanged()
|
||||
|
||||
// Never access this proc directly!!!!
|
||||
// This will update the chunk and all the surrounding chunks.
|
||||
// It will also add the atom to the cameras list if you set the choice to 1.
|
||||
// Setting the choice to 0 will remove the camera from the chunks.
|
||||
// If you want to update the chunks around an object, without adding/removing a camera, use choice 2.
|
||||
|
||||
/datum/visualnet/proc/majorChunkChange(atom/c, var/choice)
|
||||
// 0xf = 15
|
||||
if(!c)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(c)
|
||||
if(T)
|
||||
var/x1 = max(0, T.x - 8) & ~0xf
|
||||
var/y1 = max(0, T.y - 8) & ~0xf
|
||||
var/x2 = min(world.maxx, T.x + 8) & ~0xf
|
||||
var/y2 = min(world.maxy, T.y + 8) & ~0xf
|
||||
|
||||
//world << "X1: [x1] - Y1: [y1] - X2: [x2] - Y2: [y2]"
|
||||
|
||||
for(var/x = x1; x <= x2; x += 16)
|
||||
for(var/y = y1; y <= y2; y += 16)
|
||||
if(chunkGenerated(x, y, T.z))
|
||||
var/datum/chunk/chunk = getChunk(x, y, T.z)
|
||||
onMajorChunkChange(c, choice, chunk)
|
||||
chunk.hasChanged()
|
||||
|
||||
/datum/visualnet/proc/onMajorChunkChange(atom/c, var/choice, var/datum/chunk/chunk)
|
||||
|
||||
// Will check if a mob is on a viewable turf. Returns 1 if it is, otherwise returns 0.
|
||||
|
||||
/datum/visualnet/proc/checkVis(mob/living/target as mob)
|
||||
// 0xf = 15
|
||||
var/turf/position = get_turf(target)
|
||||
return checkTurfVis(position)
|
||||
|
||||
/datum/visualnet/proc/checkTurfVis(var/turf/position)
|
||||
var/datum/chunk/chunk = getChunk(position.x, position.y, position.z)
|
||||
if(chunk)
|
||||
if(chunk.changed)
|
||||
chunk.hasChanged(1) // Update now, no matter if it's visible or not.
|
||||
if(chunk.visibleTurfs[position])
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Debug verb for VVing the chunk that the turf is in.
|
||||
/*
|
||||
/turf/verb/view_chunk()
|
||||
set src in world
|
||||
|
||||
if(cameranet.chunkGenerated(x, y, z))
|
||||
var/datum/chunk/chunk = cameranet.getCameraChunk(x, y, z)
|
||||
usr.client.debug_variables(chunk)
|
||||
*/
|
||||
@@ -83,21 +83,19 @@
|
||||
/obj/item/weapon/holder/monkey
|
||||
name = "monkey"
|
||||
desc = "It's a monkey. Ook."
|
||||
icon_state = "cat"
|
||||
icon = 'icons/mob/monkey.dmi'
|
||||
icon_state = "monkey1"
|
||||
icon_state = "monkey"
|
||||
|
||||
/obj/item/weapon/holder/monkey/farwa
|
||||
name = "farwa"
|
||||
desc = "It's a farwa."
|
||||
icon_state = "tajkey1"
|
||||
icon_state = "farwa"
|
||||
|
||||
/obj/item/weapon/holder/monkey/stok
|
||||
name = "stok"
|
||||
desc = "It's a stok. stok."
|
||||
icon_state = "stokkey1"
|
||||
icon_state = "stok"
|
||||
|
||||
/obj/item/weapon/holder/monkey/neaera
|
||||
name = "neaera"
|
||||
desc = "It's a neaera."
|
||||
icon_state = "skrellkey1"
|
||||
icon_state = "neara"
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/datum/language/human/monkey
|
||||
name = "Chimpanzee"
|
||||
desc = "Ook ook ook."
|
||||
speech_verb = "chimpers"
|
||||
ask_verb = "chimpers"
|
||||
exclaim_verb = "screeches"
|
||||
key = "6"
|
||||
|
||||
/datum/language/skrell/monkey
|
||||
name = "Neara"
|
||||
desc = "Squik squik squik."
|
||||
key = "8"
|
||||
|
||||
/datum/language/unathi/monkey
|
||||
name = "Stok"
|
||||
desc = "Hiss hiss hiss."
|
||||
key = "7"
|
||||
|
||||
/datum/language/tajaran/monkey
|
||||
name = "Farwa"
|
||||
desc = "Meow meow meow."
|
||||
key = "9"
|
||||
@@ -7,7 +7,7 @@
|
||||
src << "\red You cannot speak in IC (Muted)."
|
||||
return
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
message = sanitize(message)
|
||||
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
@@ -32,5 +32,5 @@
|
||||
if(istype(container, /obj/item/device/mmi/radio_enabled))
|
||||
var/obj/item/device/mmi/radio_enabled/R = container
|
||||
if(R.radio)
|
||||
spawn(0) R.radio.hear_talk(src, trim(sanitize(message)), verb, speaking)
|
||||
spawn(0) R.radio.hear_talk(src, sanitize(message), verb, speaking)
|
||||
..(trim(message), speaking, verb)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
m_type = 1
|
||||
|
||||
if ("custom")
|
||||
var/input = sanitize(copytext(input("Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
|
||||
var/input = sanitize(input("Choose an emote to display.") as text|null)
|
||||
if (!input)
|
||||
return
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
@@ -577,7 +577,7 @@
|
||||
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(input(usr, "This is [src]. \He is...", "Pose", null) as text)
|
||||
|
||||
/mob/living/carbon/human/verb/set_flavor()
|
||||
set name = "Set Flavour Text"
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
if(getBrainLoss() >= 60)
|
||||
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
|
||||
|
||||
if((!species.has_organ["brain"] || has_brain()) && stat != DEAD)
|
||||
if(species.show_ssd && (!species.has_organ["brain"] || has_brain()) && stat != DEAD)
|
||||
if(!key)
|
||||
msg += "<span class='deadsay'>[t_He] [t_is] fast asleep. It doesn't look like they are waking up anytime soon.</span>\n"
|
||||
else if(!client)
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
if(hasHUD(usr,"security"))
|
||||
var/t1 = sanitize(copytext(input("Add Comment:", "Sec. records", null, null) as message,1,MAX_MESSAGE_LEN))
|
||||
var/t1 = sanitize(input("Add Comment:", "Sec. records", null, null) as message)
|
||||
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
|
||||
return
|
||||
var/counter = 1
|
||||
@@ -626,7 +626,7 @@
|
||||
for (var/datum/data/record/R in data_core.medical)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
if(hasHUD(usr,"medical"))
|
||||
var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
|
||||
var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message)
|
||||
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
|
||||
return
|
||||
var/counter = 1
|
||||
@@ -653,17 +653,11 @@
|
||||
src << browse(null, "window=flavor_changes")
|
||||
return
|
||||
if("general")
|
||||
var/msg = input(usr,"Update the general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Update the general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message, extra = 0)
|
||||
flavor_texts[href_list["flavor_change"]] = msg
|
||||
return
|
||||
else
|
||||
var/msg = input(usr,"Update the flavor text for your [href_list["flavor_change"]].","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Update the flavor text for your [href_list["flavor_change"]].","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message, extra = 0)
|
||||
flavor_texts[href_list["flavor_change"]] = msg
|
||||
set_flavor()
|
||||
return
|
||||
@@ -1201,7 +1195,7 @@
|
||||
|
||||
var/max_length = bloody_hands * 30 //tweeter style
|
||||
|
||||
var/message = stripped_input(src,"Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")
|
||||
var/message = sanitize(input("Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
|
||||
|
||||
if (message)
|
||||
var/used_blood_amount = round(length(message) / 30, 1)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
text = input("What would you like to say?", "Speak to creature", null, null)
|
||||
|
||||
text = trim(sanitize(copytext(text, 1, MAX_MESSAGE_LEN)))
|
||||
text = sanitize(text)
|
||||
|
||||
if(!text) return
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
set desc = "Whisper silently to someone over a distance."
|
||||
set category = "Abilities"
|
||||
|
||||
var/msg = sanitize(copytext(input("Message:", "Psychic Whisper") as text|null, 1, MAX_MESSAGE_LEN))
|
||||
var/msg = sanitize(input("Message:", "Psychic Whisper") as text|null)
|
||||
if(msg)
|
||||
log_say("PsychicWhisper: [key_name(src)]->[M.key] : [msg]")
|
||||
M << "\green You hear a strange, alien voice in your head... \italic [msg]"
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
// These may have some say.dm bugs regarding understanding common,
|
||||
// might be worth adapting the bugs into a feature and using these
|
||||
// subtypes as a basis for non-common-speaking alien foreigners. ~ Z
|
||||
|
||||
/mob/living/carbon/human/dummy
|
||||
real_name = "Test Dummy"
|
||||
status_flags = GODMODE|CANPUSH
|
||||
@@ -31,4 +27,16 @@
|
||||
|
||||
/mob/living/carbon/human/machine/New(var/new_loc)
|
||||
h_style = "blue IPC screen"
|
||||
..(new_loc, "Machine")
|
||||
..(new_loc, "Machine")
|
||||
|
||||
/mob/living/carbon/human/monkey/New(var/new_loc)
|
||||
..(new_loc, "Monkey")
|
||||
|
||||
/mob/living/carbon/human/farwa/New(var/new_loc)
|
||||
..(new_loc, "Farwa")
|
||||
|
||||
/mob/living/carbon/human/neara/New(var/new_loc)
|
||||
..(new_loc, "Neara")
|
||||
|
||||
/mob/living/carbon/human/stok/New(var/new_loc)
|
||||
..(new_loc, "Stok")
|
||||
|
||||
@@ -351,10 +351,6 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
name = "human"
|
||||
var/mob/living/carbon/human/target = null
|
||||
|
||||
/obj/effect/equip_e/monkey
|
||||
name = "monkey"
|
||||
var/mob/living/carbon/monkey/target = null
|
||||
|
||||
/obj/effect/equip_e/process()
|
||||
return
|
||||
|
||||
|
||||
@@ -100,6 +100,9 @@
|
||||
|
||||
handle_heartbeat()
|
||||
|
||||
if(!client)
|
||||
species.handle_npc(src)
|
||||
|
||||
handle_stasis_bag()
|
||||
|
||||
if(life_tick > 5 && timeofdeath && (timeofdeath < 5 || world.time - timeofdeath > 6000)) //We are long dead, or we're junk mobs spawned like the clowns on the clown shuttle
|
||||
@@ -1345,6 +1348,12 @@
|
||||
if(machine)
|
||||
if(!machine.check_eye(src))
|
||||
reset_view(null)
|
||||
else if(eyeobj)
|
||||
if(eyeobj.owner != src)
|
||||
|
||||
reset_view(null)
|
||||
else
|
||||
src.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
else
|
||||
var/isRemoteObserve = 0
|
||||
if((mRemote in mutations) && remoteview_target)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/obj/item/clothing/under/punpun
|
||||
name = "fancy uniform"
|
||||
desc = "It looks like it was tailored for a monkey."
|
||||
icon_state = "punpun"
|
||||
item_color = "punpun"
|
||||
species_restricted = list("Monkey")
|
||||
|
||||
/mob/living/carbon/human/monkey/punpun/New()
|
||||
..()
|
||||
spawn(1)
|
||||
name = "Pun Pun"
|
||||
real_name = name
|
||||
w_uniform = new /obj/item/clothing/under/punpun(src)
|
||||
@@ -10,7 +10,7 @@
|
||||
src << "\red You cannot speak in IC (Muted)."
|
||||
return
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
message = sanitize(message)
|
||||
|
||||
if(stat)
|
||||
if(stat == 2)
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
// Icon/appearance vars.
|
||||
var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set.
|
||||
var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set.
|
||||
|
||||
// Damage overlay and masks.
|
||||
var/damage_overlays = 'icons/mob/human_races/masks/dam_human.dmi'
|
||||
var/damage_mask = 'icons/mob/human_races/masks/dam_mask_human.dmi'
|
||||
var/blood_mask = 'icons/mob/human_races/masks/blood_human.dmi'
|
||||
|
||||
var/prone_icon // If set, draws this from icobase when mob is prone.
|
||||
var/eyes = "eyes_s" // Icon for eyes.
|
||||
var/blood_color = "#A10808" // Red.
|
||||
@@ -20,6 +26,8 @@
|
||||
var/tail // Name of tail image in species effects icon file.
|
||||
var/race_key = 0 // Used for mob icon cache string.
|
||||
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
|
||||
var/is_small
|
||||
var/show_ssd = 1
|
||||
|
||||
// Language/culture vars.
|
||||
var/default_language = "Galactic Common" // Default language is used when 'say' is used without modifiers.
|
||||
@@ -40,6 +48,7 @@
|
||||
var/vision_flags = 0 // Same flags as glasses.
|
||||
|
||||
// Death vars.
|
||||
var/meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human
|
||||
var/gibber_type = /obj/effect/gibspawner/human
|
||||
var/remains_type = /obj/effect/decal/remains/xeno
|
||||
var/gibbed_anim = "gibbed-h"
|
||||
@@ -91,7 +100,8 @@
|
||||
var/darksight = 2 // Native darksight distance.
|
||||
var/flags = 0 // Various specific features.
|
||||
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
|
||||
var/primitive // Lesser form, if any (ie. monkey for humans)
|
||||
var/primitive_form // Lesser form, if any (ie. monkey for humans)
|
||||
var/greater_form // Greater form, if any, ie. human for monkeys.
|
||||
var/gluttonous // Can eat some mobs. 1 for monkeys, 2 for people.
|
||||
var/rarity_value = 1 // Relative rarity/collector value for this species.
|
||||
// Determines the organs that the species spawns with and
|
||||
@@ -251,3 +261,6 @@
|
||||
|
||||
return 0
|
||||
|
||||
// Called in life() when the mob has no client.
|
||||
/datum/species/proc/handle_npc(var/mob/living/carbon/human/H)
|
||||
return
|
||||
@@ -65,4 +65,10 @@
|
||||
"storage1" = list("loc" = ui_storage1, "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "slot" = slot_belt, "state" = "belt")
|
||||
)
|
||||
|
||||
/datum/hud_data/monkey
|
||||
gear = list(
|
||||
"mask" = list("loc" = ui_shoes, "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"back" = list("loc" = ui_sstore1, "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
)
|
||||
@@ -0,0 +1,88 @@
|
||||
/datum/species/monkey
|
||||
name = "Monkey"
|
||||
name_plural = "Monkeys"
|
||||
blurb = "Ook."
|
||||
|
||||
icobase = 'icons/mob/human_races/monkeys/r_monkey.dmi'
|
||||
deform = 'icons/mob/human_races/monkeys/r_monkey.dmi'
|
||||
damage_overlays = 'icons/mob/human_races/masks/dam_monkey.dmi'
|
||||
damage_mask = 'icons/mob/human_races/masks/dam_mask_monkey.dmi'
|
||||
blood_mask = 'icons/mob/human_races/masks/blood_monkey.dmi'
|
||||
language = null
|
||||
default_language = "Chimpanzee"
|
||||
greater_form = "Human"
|
||||
is_small = 1
|
||||
has_fine_manipulation = 0
|
||||
show_ssd = 0
|
||||
eyes = "blank_eyes"
|
||||
|
||||
gibbed_anim = "gibbed-m"
|
||||
dusted_anim = "dust-m"
|
||||
death_message = "lets out a faint chimper as it collapses and stops moving..."
|
||||
tail = "chimptail"
|
||||
|
||||
unarmed_types = list(/datum/unarmed_attack/bite, /datum/unarmed_attack/claws)
|
||||
inherent_verbs = list(/mob/living/proc/ventcrawl)
|
||||
hud_type = /datum/hud_data/monkey
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey
|
||||
|
||||
rarity_value = 0.1
|
||||
total_health = 75
|
||||
brute_mod = 1.5
|
||||
burn_mod = 1.5
|
||||
|
||||
flags = IS_RESTRICTED
|
||||
|
||||
/datum/species/monkey/handle_npc(var/mob/living/carbon/human/H)
|
||||
if(H.stat != CONSCIOUS)
|
||||
return
|
||||
if(prob(33) && H.canmove && isturf(H.loc) && !H.pulledby) //won't move if being pulled
|
||||
step(H, pick(cardinal))
|
||||
if(prob(1))
|
||||
H.emote(pick("scratch","jump","roll","tail"))
|
||||
|
||||
/datum/species/monkey/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
H.real_name = "[lowertext(name)] ([rand(100,999)])"
|
||||
H.name = H.real_name
|
||||
..()
|
||||
|
||||
/datum/species/monkey/tajaran
|
||||
name = "Farwa"
|
||||
name_plural = "Farwa"
|
||||
|
||||
icobase = 'icons/mob/human_races/monkeys/r_farwa.dmi'
|
||||
deform = 'icons/mob/human_races/monkeys/r_farwa.dmi'
|
||||
|
||||
greater_form = "Tajaran"
|
||||
default_language = "Farwa"
|
||||
flesh_color = "#AFA59E"
|
||||
base_color = "#333333"
|
||||
tail = "farwatail"
|
||||
|
||||
/datum/species/monkey/skrell
|
||||
name = "Neara"
|
||||
name_plural = "Neara"
|
||||
|
||||
icobase = 'icons/mob/human_races/monkeys/r_neara.dmi'
|
||||
deform = 'icons/mob/human_races/monkeys/r_neara.dmi'
|
||||
|
||||
greater_form = "Skrell"
|
||||
default_language = "Neara"
|
||||
flesh_color = "#8CD7A3"
|
||||
blood_color = "#1D2CBF"
|
||||
reagent_tag = IS_SKRELL
|
||||
tail = null
|
||||
|
||||
/datum/species/monkey/unathi
|
||||
name = "Stok"
|
||||
name_plural = "Stok"
|
||||
|
||||
icobase = 'icons/mob/human_races/monkeys/r_stok.dmi'
|
||||
deform = 'icons/mob/human_races/monkeys/r_stok.dmi'
|
||||
|
||||
tail = "stoktail"
|
||||
greater_form = "Unathi"
|
||||
default_language = "Stok"
|
||||
flesh_color = "#34AF10"
|
||||
base_color = "#066000"
|
||||
reagent_tag = IS_UNATHI
|
||||
@@ -1,6 +1,7 @@
|
||||
/datum/species/slime
|
||||
name = "Slime"
|
||||
name_plural = "slimes"
|
||||
is_small = 1
|
||||
|
||||
icobase = 'icons/mob/human_races/r_slime.dmi'
|
||||
deform = 'icons/mob/human_races/r_slime.dmi'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Human"
|
||||
name_plural = "Humans"
|
||||
language = "Sol Common"
|
||||
primitive = /mob/living/carbon/monkey
|
||||
primitive_form = "Monkey"
|
||||
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/punch, /datum/unarmed_attack/bite)
|
||||
blurb = "Humanity originated in the Sol system, and over the last five centuries has spread \
|
||||
colonies across a wide swathe of space. They hold a wide range of forms and creeds.<br/><br/> \
|
||||
@@ -20,7 +20,7 @@
|
||||
language = "Sinta'unathi"
|
||||
tail = "sogtail"
|
||||
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
|
||||
primitive = /mob/living/carbon/monkey/unathi
|
||||
primitive_form = "Stok"
|
||||
darksight = 3
|
||||
gluttonous = 1
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
heat_level_2 = 380 //Default 400
|
||||
heat_level_3 = 800 //Default 1000
|
||||
|
||||
primitive = /mob/living/carbon/monkey/tajara
|
||||
primitive_form = "Farwa"
|
||||
|
||||
flags = CAN_JOIN | IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
deform = 'icons/mob/human_races/r_def_skrell.dmi'
|
||||
eyes = "skrell_eyes_s"
|
||||
language = "Skrellian"
|
||||
primitive = /mob/living/carbon/monkey/skrell
|
||||
primitive_form = "Neara"
|
||||
unarmed_types = list(/datum/unarmed_attack/punch)
|
||||
blurb = "An amphibious species, Skrell come from the star system known as Qerr'Vallis, which translates to 'Star of \
|
||||
the royals' or 'Light of the Crown'.<br/><br/>Skrell are a highly advanced and logical race who live under the rule \
|
||||
@@ -130,7 +130,7 @@
|
||||
deform = 'icons/mob/human_races/r_def_plant.dmi'
|
||||
language = "Rootspeak"
|
||||
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/diona)
|
||||
primitive = /mob/living/carbon/alien/diona
|
||||
//primitive_form = "Nymph"
|
||||
slowdown = 7
|
||||
rarity_value = 3
|
||||
hud_type = /datum/hud_data/diona
|
||||
|
||||
@@ -175,15 +175,6 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
src.transform = M
|
||||
|
||||
var/global/list/damage_icon_parts = list()
|
||||
proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(damage_icon_parts["[damage_state]/[body_part]"] == null)
|
||||
var/icon/DI = new /icon('icons/mob/dam_human.dmi', damage_state) // the damage icon for whole human
|
||||
// TODO: Convert dam_human.dmi to greyscale and blend in species.blood_colour here.
|
||||
DI.Blend(new /icon('icons/mob/dam_mask.dmi', body_part), ICON_MULTIPLY) // mask with this organ's pixels
|
||||
damage_icon_parts["[damage_state]/[body_part]"] = DI
|
||||
return DI
|
||||
else
|
||||
return damage_icon_parts["[damage_state]/[body_part]"]
|
||||
|
||||
//DAMAGE OVERLAYS
|
||||
//constructs damage icon for each organ from mask * damage field and saves it in our overlays_ lists
|
||||
@@ -202,7 +193,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
previous_damage_appearance = damage_appearance
|
||||
|
||||
var/icon/standing = new /icon('icons/mob/dam_human.dmi', "00")
|
||||
var/icon/standing = new /icon(species.damage_overlays, "00")
|
||||
|
||||
var/image/standing_image = new /image("icon" = standing)
|
||||
|
||||
@@ -211,8 +202,15 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(!(O.status & ORGAN_DESTROYED))
|
||||
O.update_icon()
|
||||
if(O.damage_state == "00") continue
|
||||
|
||||
var/icon/DI = get_damage_icon_part(O.damage_state, O.icon_name)
|
||||
var/icon/DI
|
||||
var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.name]"
|
||||
if(damage_icon_parts[cache_index] == null)
|
||||
DI = new /icon(species.damage_overlays, O.damage_state) // the damage icon for whole human
|
||||
DI.Blend(new /icon(species.damage_mask, O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
|
||||
DI.Blend(species.blood_color, ICON_MULTIPLY)
|
||||
damage_icon_parts[cache_index] = DI
|
||||
else
|
||||
DI = damage_icon_parts[cache_index]
|
||||
|
||||
standing_image.overlays += DI
|
||||
|
||||
@@ -336,7 +334,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
base_icon.MapColors(rgb(tone[1],0,0),rgb(0,tone[2],0),rgb(0,0,tone[3]))
|
||||
|
||||
//Handle husk overlay.
|
||||
if(husk)
|
||||
if(husk && ("overlay_husk" in icon_states(race_icon)))
|
||||
var/icon/mask = new(base_icon)
|
||||
var/icon/husk_over = new(race_icon,"overlay_husk")
|
||||
mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0)
|
||||
@@ -534,7 +532,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
standing.icon = 'icons/mob/uniform.dmi'
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood")
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "uniformblood")
|
||||
bloodsies.color = w_uniform.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
@@ -583,14 +581,14 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
standing = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]")
|
||||
|
||||
if(gloves.blood_DNA)
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "bloodyhands")
|
||||
bloodsies.color = gloves.blood_color
|
||||
standing.overlays += bloodsies
|
||||
gloves.screen_loc = ui_gloves
|
||||
overlays_standing[GLOVES_LAYER] = standing
|
||||
else
|
||||
if(blood_DNA)
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "bloodyhands")
|
||||
bloodsies.color = hand_blood_color
|
||||
overlays_standing[GLOVES_LAYER] = bloodsies
|
||||
else
|
||||
@@ -659,13 +657,13 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
standing = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]")
|
||||
|
||||
if(shoes.blood_DNA)
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood")
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "shoeblood")
|
||||
bloodsies.color = shoes.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[SHOES_LAYER] = standing
|
||||
else
|
||||
if(feet_blood_DNA)
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood")
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "shoeblood")
|
||||
bloodsies.color = feet_blood_color
|
||||
overlays_standing[SHOES_LAYER] = bloodsies
|
||||
else
|
||||
@@ -698,7 +696,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
standing = image("icon" = 'icons/mob/head.dmi', "icon_state" = "[head.icon_state]")
|
||||
|
||||
if(head.blood_DNA)
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood")
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "helmetblood")
|
||||
bloodsies.color = head.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
@@ -760,7 +758,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/obj/item/clothing/suit/S = wear_suit
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "[S.blood_overlay_type]blood")
|
||||
bloodsies.color = wear_suit.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
@@ -796,7 +794,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]")
|
||||
|
||||
if( !istype(wear_mask, /obj/item/clothing/mask/smokable/cigarette) && wear_mask.blood_DNA )
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
|
||||
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "maskblood")
|
||||
bloodsies.color = wear_mask.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[FACEMASK_LAYER] = standing
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
message = sanitize(message)
|
||||
log_whisper("[src.name]/[src.key] : [message]")
|
||||
|
||||
if (src.client)
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
pet.colour = "[M.colour]"
|
||||
user <<"You feed the slime the potion, removing it's powers and calming it."
|
||||
del(M)
|
||||
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
|
||||
var/newname = sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text, MAX_NAME_LEN)
|
||||
|
||||
if (!newname)
|
||||
newname = "pet slime"
|
||||
@@ -177,7 +177,7 @@
|
||||
pet.colour = "[M.colour]"
|
||||
user <<"You feed the slime the potion, removing it's powers and calming it."
|
||||
del(M)
|
||||
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
|
||||
var/newname = sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text, MAX_NAME_LEN)
|
||||
|
||||
if (!newname)
|
||||
newname = "pet slime"
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
Target = C
|
||||
break
|
||||
|
||||
if(isalien(C) || ismonkey(C) || isanimal(C))
|
||||
if(isalien(C) || issmall(C) || isanimal(C))
|
||||
Target = C
|
||||
break
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/mob/living/carbon/monkey/gib()
|
||||
..(null,1)
|
||||
|
||||
/mob/living/carbon/monkey/dust()
|
||||
..("dust-m")
|
||||
|
||||
/mob/living/carbon/monkey/death(gibbed)
|
||||
..(gibbed,"lets out a faint chimper as it collapses and stops moving...")
|
||||
@@ -1,132 +0,0 @@
|
||||
/mob/living/carbon/monkey/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 = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||
|
||||
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("sign")
|
||||
if (!src.restrained())
|
||||
message = text("<B>The monkey</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 = text("<B>[]</B> collapses!", src)
|
||||
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("help")
|
||||
text += "choke, collapse, dance, deathgasp, drool, gasp, shiver, gnarl, jump, paw, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper"
|
||||
src << text
|
||||
else
|
||||
src << text("Invalid Emote: []", act)
|
||||
if ((message && src.stat == 0))
|
||||
if(src.client)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
if (m_type & 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
//Foreach goto(703)
|
||||
else
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
//Foreach goto(746)
|
||||
return
|
||||
@@ -1,39 +0,0 @@
|
||||
/mob/living/carbon/monkey/examine(mob/user)
|
||||
..(user)
|
||||
|
||||
var/msg = ""
|
||||
if (src.handcuffed)
|
||||
msg += "It is \icon[src.handcuffed] handcuffed!\n"
|
||||
if (src.wear_mask)
|
||||
msg += "It has \icon[src.wear_mask] \a [src.wear_mask] on its head.\n"
|
||||
if (src.l_hand)
|
||||
msg += "It has \icon[src.l_hand] \a [src.l_hand] in its left hand.\n"
|
||||
if (src.r_hand)
|
||||
msg += "It has \icon[src.r_hand] \a [src.r_hand] in its right hand.\n"
|
||||
if (src.back)
|
||||
msg += "It has \icon[src.back] \a [src.back] on its back.\n"
|
||||
if (src.stat == DEAD)
|
||||
msg += "<span class='deadsay'>It is limp and unresponsive, with no signs of life.</span>\n"
|
||||
else
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 30)
|
||||
msg += "It has minor bruising.\n"
|
||||
else
|
||||
msg += "<B>It has severe bruising!</B>\n"
|
||||
if (src.getFireLoss())
|
||||
if (src.getFireLoss() < 30)
|
||||
msg += "It has minor burns.\n"
|
||||
else
|
||||
msg += "<B>It has severe burns!</B>\n"
|
||||
if (src.stat == UNCONSCIOUS)
|
||||
msg += "It isn't responding to anything around it; it seems to be asleep.\n"
|
||||
msg += "</span>"
|
||||
|
||||
if (src.digitalcamo)
|
||||
msg += "It is repulsively uncanny!\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
user << msg
|
||||
return
|
||||
@@ -1,238 +0,0 @@
|
||||
/obj/effect/equip_e/monkey/process()
|
||||
if (item)
|
||||
item.add_fingerprint(source)
|
||||
if (!( item ))
|
||||
switch(place)
|
||||
if("head")
|
||||
if (!( target.wear_mask ))
|
||||
del(src)
|
||||
return
|
||||
if("l_hand")
|
||||
if (!( target.l_hand ))
|
||||
del(src)
|
||||
return
|
||||
if("r_hand")
|
||||
if (!( target.r_hand ))
|
||||
del(src)
|
||||
return
|
||||
if("back")
|
||||
if (!( target.back ))
|
||||
del(src)
|
||||
return
|
||||
if("handcuff")
|
||||
if (!( target.handcuffed ))
|
||||
del(src)
|
||||
return
|
||||
if("internal")
|
||||
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal )))
|
||||
del(src)
|
||||
return
|
||||
|
||||
if (item)
|
||||
if(isrobot(source) && place != "handcuff")
|
||||
var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel")
|
||||
if(!(L.Find(place)))
|
||||
del(src)
|
||||
return
|
||||
for(var/mob/O in viewers(target, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] is trying to put a [] on []</B>", source, item, target), 1)
|
||||
else
|
||||
var/message = null
|
||||
switch(place)
|
||||
if("mask")
|
||||
if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove)
|
||||
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_mask, target)
|
||||
else
|
||||
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", source, target.wear_mask, target)
|
||||
if("l_hand")
|
||||
message = text("\red <B>[] is trying to take off a [] from []'s left hand!</B>", source, target.l_hand, target)
|
||||
if("r_hand")
|
||||
message = text("\red <B>[] is trying to take off a [] from []'s right hand!</B>", source, target.r_hand, target)
|
||||
if("back")
|
||||
message = text("\red <B>[] is trying to take off a [] from []'s back!</B>", source, target.back, target)
|
||||
if("handcuff")
|
||||
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
message = text("\red <B>[] is trying to remove []'s internals</B>", source, target)
|
||||
else
|
||||
message = text("\red <B>[] is trying to set on []'s internals.</B>", source, target)
|
||||
if("pockets")
|
||||
message = text("\red <B>[] is trying to empty []'s pockets</B>",source, target)
|
||||
else
|
||||
for(var/mob/M in viewers(target, null))
|
||||
M.show_message(message, 1)
|
||||
spawn( 30 )
|
||||
done()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/monkey/done()
|
||||
if(!source || !target) return
|
||||
if(source.loc != s_loc) return
|
||||
if(target.loc != t_loc) return
|
||||
if(LinkBlocked(s_loc,t_loc)) return
|
||||
if(item && source.get_active_hand() != item) return
|
||||
if ((source.restrained() || source.stat)) return
|
||||
switch(place)
|
||||
if("mask")
|
||||
if (target.wear_mask)
|
||||
if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove)
|
||||
return
|
||||
var/obj/item/W = target.wear_mask
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item/clothing/mask))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.wear_mask = item
|
||||
item.loc = target
|
||||
if("l_hand")
|
||||
if (target.l_hand)
|
||||
var/obj/item/W = target.l_hand
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped(target)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.l_hand = item
|
||||
item.loc = target
|
||||
item.dropped(source)
|
||||
item.equipped(target,target.l_hand)
|
||||
if("r_hand")
|
||||
if (target.r_hand)
|
||||
var/obj/item/W = target.r_hand
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped(target)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.r_hand = item
|
||||
item.loc = target
|
||||
item.dropped(source)
|
||||
item.equipped(target,target.r_hand)
|
||||
if("back")
|
||||
if (target.back)
|
||||
var/obj/item/W = target.back
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if ((istype(item, /obj/item) && item.slot_flags & SLOT_BACK ))
|
||||
source.drop_item()
|
||||
loc = target
|
||||
item.layer = 20
|
||||
target.back = item
|
||||
item.loc = target
|
||||
if("handcuff")
|
||||
if (target.handcuffed)
|
||||
var/obj/item/W = target.handcuffed
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item/weapon/handcuffs))
|
||||
source.drop_item()
|
||||
target.handcuffed = item
|
||||
item.loc = target
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
target.internal.add_fingerprint(source)
|
||||
target.internal = null
|
||||
else
|
||||
if (target.internal)
|
||||
target.internal = null
|
||||
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
|
||||
return
|
||||
else
|
||||
if (istype(target.back, /obj/item/weapon/tank))
|
||||
target.internal = target.back
|
||||
target.internal.add_fingerprint(source)
|
||||
for(var/mob/M in viewers(target, 1))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("[] is now running on internals.", target), 1)
|
||||
else
|
||||
source.regenerate_icons()
|
||||
target.regenerate_icons()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
|
||||
//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
|
||||
/mob/living/carbon/monkey/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1)
|
||||
if(!slot) return
|
||||
if(!istype(W)) return
|
||||
|
||||
if(W == get_active_hand())
|
||||
u_equip(W)
|
||||
|
||||
switch(slot)
|
||||
if(slot_back)
|
||||
src.back = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_back(redraw_mob)
|
||||
if(slot_wear_mask)
|
||||
src.wear_mask = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_wear_mask(redraw_mob)
|
||||
if(slot_handcuffed)
|
||||
src.handcuffed = W
|
||||
update_inv_handcuffed(redraw_mob)
|
||||
if(slot_legcuffed)
|
||||
src.legcuffed = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_legcuffed(redraw_mob)
|
||||
if(slot_l_hand)
|
||||
src.l_hand = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_l_hand(redraw_mob)
|
||||
if(slot_r_hand)
|
||||
src.r_hand = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_r_hand(redraw_mob)
|
||||
if(slot_in_backpack)
|
||||
W.loc = src.back
|
||||
else
|
||||
usr << "\red You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
|
||||
return
|
||||
|
||||
W.layer = 20
|
||||
|
||||
return
|
||||
@@ -1,4 +0,0 @@
|
||||
/mob/living/carbon/monkey/Login()
|
||||
..()
|
||||
update_hud()
|
||||
return
|
||||
@@ -1,89 +0,0 @@
|
||||
mob/living/carbon/monkey/var
|
||||
mob/npc_target = null // the NPC this monkey is attacking
|
||||
mob/npc_fleeing = null // the monkey is scared of this mob
|
||||
mob/hiding_behind = null
|
||||
hid_behind = 0
|
||||
|
||||
var/list/hostiles = list()
|
||||
|
||||
fleeing_duration = 0
|
||||
|
||||
mob/living/carbon/monkey/proc/npc_act()
|
||||
if(!client && !stat)
|
||||
if(npc_fleeing && canmove)
|
||||
var/prevloc = loc
|
||||
if(!hiding_behind)
|
||||
for(var/mob/living/carbon/human/H in view(7, src))
|
||||
if(!hostiles.Find(H))
|
||||
hiding_behind = H
|
||||
|
||||
if(hiding_behind)
|
||||
if(get_dist(src, hiding_behind) == 1)
|
||||
if(!hid_behind)
|
||||
emote("me", 1, "hides behind [hiding_behind]!")
|
||||
hid_behind = 1
|
||||
step_to(src, get_step(hiding_behind, get_dir(npc_fleeing, hiding_behind)))
|
||||
else
|
||||
if(!step_to(src, hiding_behind, 1))
|
||||
hiding_behind = null
|
||||
else
|
||||
step_away(src, npc_fleeing, 7)
|
||||
|
||||
if(prob(7))
|
||||
if(prob(50) && (npc_fleeing in view(8,src)))
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
emote("me", 1, "shows [npc_fleeing] its fangs!")
|
||||
if(2)
|
||||
emote("me", 2, "gnarls at [npc_fleeing].")
|
||||
if(3)
|
||||
emote("me", 2, "eyes [npc_fleeing] fearfully.")
|
||||
else
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
emote("whimper")
|
||||
if(2)
|
||||
emote("me", 1, "trembles heavily.")
|
||||
if(3)
|
||||
emote("me", 2, "chimpers nervously.")
|
||||
|
||||
fleeing_duration--
|
||||
if(fleeing_duration <= 0)
|
||||
npc_fleeing = null
|
||||
hiding_behind = null
|
||||
hid_behind = 0
|
||||
|
||||
if(loc == prevloc) set_dir(get_dir(src, npc_fleeing))
|
||||
else
|
||||
if(prob(33) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
if(prob(1))
|
||||
if(health < 70)
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
emote("me", 1, "cowers on the floor, writhing in pain.")
|
||||
if(2)
|
||||
emote("me", 1, "trembles visibly, it seems to be in pain.")
|
||||
if(3)
|
||||
emote("me", 1, "wraps its arms around its knees, breathing heavily.")
|
||||
else
|
||||
emote(pick("scratch","jump","roll","tail"))
|
||||
|
||||
mob/living/carbon/monkey/react_to_attack(mob/M)
|
||||
if(npc_fleeing == M)
|
||||
fleeing_duration += 30
|
||||
return
|
||||
|
||||
if(!hostiles.Find(M)) hostiles += M
|
||||
|
||||
spawn(5)
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
emote("me", 1, "flails about wildly!")
|
||||
if(2)
|
||||
emote("me", 2, "screams loudly at [M]!")
|
||||
if(3)
|
||||
emote("me", 2, "whimpers fearfully!")
|
||||
|
||||
npc_fleeing = M
|
||||
fleeing_duration = 30
|
||||
@@ -1,129 +0,0 @@
|
||||
//Monkey Overlays Indexes////////
|
||||
#define M_MASK_LAYER 1
|
||||
#define M_BACK_LAYER 2
|
||||
#define M_HANDCUFF_LAYER 3
|
||||
#define M_L_HAND_LAYER 4
|
||||
#define M_R_HAND_LAYER 5
|
||||
#define TARGETED_LAYER 6
|
||||
#define M_FIRE_LAYER 6
|
||||
#define M_TOTAL_LAYERS 7
|
||||
/////////////////////////////////
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
var/list/overlays_lying[M_TOTAL_LAYERS]
|
||||
var/list/overlays_standing[M_TOTAL_LAYERS]
|
||||
|
||||
/mob/living/carbon/monkey/regenerate_icons()
|
||||
..()
|
||||
update_inv_wear_mask(0)
|
||||
update_inv_back(0)
|
||||
update_inv_r_hand(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_handcuffed(0)
|
||||
update_fire(0)
|
||||
update_icons()
|
||||
//Hud Stuff
|
||||
update_hud()
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/update_icons()
|
||||
update_hud()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
overlays.Cut()
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
if(lying)
|
||||
var/matrix/M = matrix()
|
||||
M.Turn(90)
|
||||
M.Translate(1,-6)
|
||||
src.transform = M
|
||||
else
|
||||
var/matrix/M = matrix()
|
||||
src.transform = M
|
||||
|
||||
|
||||
////////
|
||||
/mob/living/carbon/monkey/update_inv_wear_mask(var/update_icons=1)
|
||||
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
|
||||
overlays_standing[M_MASK_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]")
|
||||
wear_mask.screen_loc = ui_monkey_mask
|
||||
else
|
||||
overlays_standing[M_MASK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
overlays_standing[M_R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = t_state)
|
||||
r_hand.screen_loc = ui_rhand
|
||||
if (handcuffed) drop_r_hand()
|
||||
else
|
||||
overlays_standing[M_R_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_l_hand(var/update_icons=1)
|
||||
if(l_hand)
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
overlays_standing[M_L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = t_state)
|
||||
l_hand.screen_loc = ui_lhand
|
||||
if (handcuffed) drop_l_hand()
|
||||
else
|
||||
overlays_standing[M_L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_back(var/update_icons=1)
|
||||
if(back)
|
||||
overlays_standing[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]")
|
||||
back.screen_loc = ui_monkey_back
|
||||
else
|
||||
overlays_standing[M_BACK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_handcuffed(var/update_icons=1)
|
||||
if(handcuffed)
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
stop_pulling()
|
||||
overlays_standing[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff1")
|
||||
else
|
||||
overlays_standing[M_HANDCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_hud()
|
||||
if (client)
|
||||
client.screen |= contents
|
||||
|
||||
//Call when target overlay should be added/removed
|
||||
/mob/living/carbon/monkey/update_targeted(var/update_icons=1)
|
||||
if (targeted_by && target_locked)
|
||||
overlays_standing[TARGETED_LAYER] = target_locked
|
||||
else if (!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
if (!targeted_by)
|
||||
overlays_standing[TARGETED_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/monkey/update_fire(var/update_icons=1)
|
||||
if(on_fire)
|
||||
overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER)
|
||||
else
|
||||
overlays_standing[M_FIRE_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
//Monkey Overlays Indexes////////
|
||||
#undef M_MASK_LAYER
|
||||
#undef M_BACK_LAYER
|
||||
#undef M_HANDCUFF_LAYER
|
||||
#undef M_L_HAND_LAYER
|
||||
#undef M_R_HAND_LAYER
|
||||
#undef TARGETED_LAYER
|
||||
#undef M_FIRE_LAYER
|
||||
#undef M_TOTAL_LAYERS
|
||||
|
||||
@@ -59,13 +59,6 @@
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
return 1
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
if (COLD_RESISTANCE in src.mutations) //fireproof
|
||||
return 0
|
||||
var/mob/living/carbon/monkey/M = src
|
||||
M.adjustFireLoss(burn_amount)
|
||||
M.updatehealth()
|
||||
return 1
|
||||
else if(istype(src, /mob/living/silicon/ai))
|
||||
return 0
|
||||
|
||||
@@ -241,7 +234,7 @@
|
||||
src.updatehealth()
|
||||
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/take_organ_damage(var/brute, var/burn)
|
||||
/mob/living/proc/take_organ_damage(var/brute, var/burn, var/emp=0)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
|
||||
@@ -189,7 +189,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
src << radio_text
|
||||
|
||||
if (!(ticker && ticker.mode && (mind in malf.current_antagonists)))
|
||||
if (malf && !(mind in malf.current_antagonists))
|
||||
show_laws()
|
||||
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
|
||||
|
||||
@@ -2,157 +2,45 @@
|
||||
//
|
||||
// The datum containing all the chunks.
|
||||
|
||||
var/datum/cameranet/cameranet = new()
|
||||
var/datum/visualnet/camera/cameranet = new()
|
||||
|
||||
/datum/cameranet
|
||||
/datum/visualnet/camera
|
||||
// The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Del().
|
||||
var/list/cameras = list()
|
||||
var/cameras_unsorted = 1
|
||||
// The chunks of the map, mapping the areas that the cameras can see.
|
||||
var/list/chunks = list()
|
||||
var/ready = 0
|
||||
chunk_type = /datum/chunk/camera
|
||||
|
||||
/datum/cameranet/proc/process_sort()
|
||||
/datum/visualnet/camera/proc/process_sort()
|
||||
if(cameras_unsorted)
|
||||
cameras = dd_sortedObjectList(cameras)
|
||||
cameras_unsorted = 0
|
||||
|
||||
// Checks if a chunk has been Generated in x, y, z.
|
||||
/datum/cameranet/proc/chunkGenerated(x, y, z)
|
||||
x &= ~0xf
|
||||
y &= ~0xf
|
||||
var/key = "[x],[y],[z]"
|
||||
return (chunks[key])
|
||||
|
||||
// Returns the chunk in the x, y, z.
|
||||
// If there is no chunk, it creates a new chunk and returns that.
|
||||
/datum/cameranet/proc/getCameraChunk(x, y, z)
|
||||
x &= ~0xf
|
||||
y &= ~0xf
|
||||
var/key = "[x],[y],[z]"
|
||||
if(!chunks[key])
|
||||
chunks[key] = new /datum/camerachunk(null, x, y, z)
|
||||
|
||||
return chunks[key]
|
||||
|
||||
// Updates what the aiEye can see. It is recommended you use this when the aiEye moves or it's location is set.
|
||||
|
||||
/datum/cameranet/proc/visibility(mob/aiEye/ai)
|
||||
// 0xf = 15
|
||||
var/x1 = max(0, ai.x - 16) & ~0xf
|
||||
var/y1 = max(0, ai.y - 16) & ~0xf
|
||||
var/x2 = min(world.maxx, ai.x + 16) & ~0xf
|
||||
var/y2 = min(world.maxy, ai.y + 16) & ~0xf
|
||||
|
||||
var/list/visibleChunks = list()
|
||||
|
||||
for(var/x = x1; x <= x2; x += 16)
|
||||
for(var/y = y1; y <= y2; y += 16)
|
||||
visibleChunks += getCameraChunk(x, y, ai.z)
|
||||
|
||||
var/list/remove = ai.visibleCameraChunks - visibleChunks
|
||||
var/list/add = visibleChunks - ai.visibleCameraChunks
|
||||
|
||||
for(var/chunk in remove)
|
||||
var/datum/camerachunk/c = chunk
|
||||
c.remove(ai)
|
||||
|
||||
for(var/chunk in add)
|
||||
var/datum/camerachunk/c = chunk
|
||||
c.add(ai)
|
||||
|
||||
// Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open.
|
||||
|
||||
/datum/cameranet/proc/updateVisibility(atom/A, var/opacity_check = 1)
|
||||
|
||||
if(!ticker || (opacity_check && !A.opacity))
|
||||
return
|
||||
majorChunkChange(A, 2)
|
||||
|
||||
/datum/cameranet/proc/updateChunk(x, y, z)
|
||||
// 0xf = 15
|
||||
if(!chunkGenerated(x, y, z))
|
||||
return
|
||||
var/datum/camerachunk/chunk = getCameraChunk(x, y, z)
|
||||
chunk.hasChanged()
|
||||
|
||||
// Removes a camera from a chunk.
|
||||
|
||||
/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
|
||||
/datum/visualnet/camera/proc/removeCamera(obj/machinery/camera/c)
|
||||
if(c.can_use())
|
||||
majorChunkChange(c, 0)
|
||||
|
||||
// Add a camera to a chunk.
|
||||
|
||||
/datum/cameranet/proc/addCamera(obj/machinery/camera/c)
|
||||
/datum/visualnet/camera/proc/addCamera(obj/machinery/camera/c)
|
||||
if(c.can_use())
|
||||
majorChunkChange(c, 1)
|
||||
|
||||
// Used for Cyborg cameras. Since portable cameras can be in ANY chunk.
|
||||
|
||||
/datum/cameranet/proc/updatePortableCamera(obj/machinery/camera/c)
|
||||
/datum/visualnet/camera/proc/updatePortableCamera(obj/machinery/camera/c)
|
||||
if(c.can_use())
|
||||
majorChunkChange(c, 1)
|
||||
//else
|
||||
// majorChunkChange(c, 0)
|
||||
|
||||
// Never access this proc directly!!!!
|
||||
// This will update the chunk and all the surrounding chunks.
|
||||
// It will also add the atom to the cameras list if you set the choice to 1.
|
||||
// Setting the choice to 0 will remove the camera from the chunks.
|
||||
// If you want to update the chunks around an object, without adding/removing a camera, use choice 2.
|
||||
|
||||
/datum/cameranet/proc/majorChunkChange(atom/c, var/choice)
|
||||
// 0xf = 15
|
||||
if(!c)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(c)
|
||||
if(T)
|
||||
var/x1 = max(0, T.x - 8) & ~0xf
|
||||
var/y1 = max(0, T.y - 8) & ~0xf
|
||||
var/x2 = min(world.maxx, T.x + 8) & ~0xf
|
||||
var/y2 = min(world.maxy, T.y + 8) & ~0xf
|
||||
|
||||
//world << "X1: [x1] - Y1: [y1] - X2: [x2] - Y2: [y2]"
|
||||
|
||||
for(var/x = x1; x <= x2; x += 16)
|
||||
for(var/y = y1; y <= y2; y += 16)
|
||||
if(chunkGenerated(x, y, T.z))
|
||||
var/datum/camerachunk/chunk = getCameraChunk(x, y, T.z)
|
||||
// Only add actual cameras to the list of cameras
|
||||
if(istype(c, /obj/machinery/camera))
|
||||
if(choice == 0)
|
||||
// Remove the camera.
|
||||
chunk.cameras -= c
|
||||
else if(choice == 1)
|
||||
// You can't have the same camera in the list twice.
|
||||
chunk.cameras |= c
|
||||
chunk.hasChanged()
|
||||
|
||||
// Will check if a mob is on a viewable turf. Returns 1 if it is, otherwise returns 0.
|
||||
|
||||
/datum/cameranet/proc/checkCameraVis(mob/living/target as mob)
|
||||
|
||||
// 0xf = 15
|
||||
var/turf/position = get_turf(target)
|
||||
return checkTurfVis(position)
|
||||
|
||||
/datum/cameranet/proc/checkTurfVis(var/turf/position)
|
||||
var/datum/camerachunk/chunk = getCameraChunk(position.x, position.y, position.z)
|
||||
if(chunk)
|
||||
if(chunk.changed)
|
||||
chunk.hasChanged(1) // Update now, no matter if it's visible or not.
|
||||
if(chunk.visibleTurfs[position])
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Debug verb for VVing the chunk that the turf is in.
|
||||
/*
|
||||
/turf/verb/view_chunk()
|
||||
set src in world
|
||||
|
||||
if(cameranet.chunkGenerated(x, y, z))
|
||||
var/datum/camerachunk/chunk = cameranet.getCameraChunk(x, y, z)
|
||||
usr.client.debug_variables(chunk)
|
||||
*/
|
||||
/datum/visualnet/camera/onMajorChunkChange(atom/c, var/choice, var/datum/chunk/camera/chunk)
|
||||
// Only add actual cameras to the list of cameras
|
||||
if(istype(c, /obj/machinery/camera))
|
||||
if(choice == 0)
|
||||
// Remove the camera.
|
||||
chunk.cameras -= c
|
||||
else if(choice == 1)
|
||||
// You can't have the same camera in the list twice.
|
||||
chunk.cameras |= c
|
||||
|
||||
@@ -1,77 +1,12 @@
|
||||
#define UPDATE_BUFFER 25 // 2.5 seconds
|
||||
|
||||
// CAMERA CHUNK
|
||||
//
|
||||
// A 16x16 grid of the map with a list of turfs that can be seen, are visible and are dimmed.
|
||||
// Allows the AI Eye to stream these chunks and know what it can and cannot see.
|
||||
// Allows the Eye to stream these chunks and know what it can and cannot see.
|
||||
|
||||
/datum/camerachunk
|
||||
var/list/obscuredTurfs = list()
|
||||
var/list/visibleTurfs = list()
|
||||
var/list/obscured = list()
|
||||
/datum/chunk/camera
|
||||
var/list/cameras = list()
|
||||
var/list/turfs = list()
|
||||
var/list/seenby = list()
|
||||
var/visible = 0
|
||||
var/changed = 0
|
||||
var/updating = 0
|
||||
var/x = 0
|
||||
var/y = 0
|
||||
var/z = 0
|
||||
|
||||
// Add an AI eye to the chunk, then update if changed.
|
||||
|
||||
/datum/camerachunk/proc/add(mob/aiEye/ai)
|
||||
if(!ai.ai)
|
||||
return
|
||||
ai.visibleCameraChunks += src
|
||||
if(ai.ai.client)
|
||||
ai.ai.client.images += obscured
|
||||
visible++
|
||||
seenby += ai
|
||||
if(changed && !updating)
|
||||
update()
|
||||
|
||||
// Remove an AI eye from the chunk, then update if changed.
|
||||
|
||||
/datum/camerachunk/proc/remove(mob/aiEye/ai)
|
||||
if(!ai.ai)
|
||||
return
|
||||
ai.visibleCameraChunks -= src
|
||||
if(ai.ai.client)
|
||||
ai.ai.client.images -= obscured
|
||||
seenby -= ai
|
||||
if(visible > 0)
|
||||
visible--
|
||||
|
||||
// Called when a chunk has changed. I.E: A wall was deleted.
|
||||
|
||||
/datum/camerachunk/proc/visibilityChanged(turf/loc)
|
||||
if(!visibleTurfs[loc])
|
||||
return
|
||||
hasChanged()
|
||||
|
||||
// Updates the chunk, makes sure that it doesn't update too much. If the chunk isn't being watched it will
|
||||
// instead be flagged to update the next time an AI Eye moves near it.
|
||||
|
||||
/datum/camerachunk/proc/hasChanged(var/update_now = 0)
|
||||
if(visible || update_now)
|
||||
if(!updating)
|
||||
updating = 1
|
||||
spawn(UPDATE_BUFFER) // Batch large changes, such as many doors opening or closing at once
|
||||
update()
|
||||
updating = 0
|
||||
else
|
||||
changed = 1
|
||||
|
||||
// The actual updating. It gathers the visible turfs from cameras and puts them into the appropriate lists.
|
||||
|
||||
/datum/camerachunk/proc/update()
|
||||
|
||||
set background = 1
|
||||
|
||||
var/list/newVisibleTurfs = list()
|
||||
|
||||
/datum/chunk/camera/acquireVisibleTurfs(var/list/visible)
|
||||
for(var/camera in cameras)
|
||||
var/obj/machinery/camera/c = camera
|
||||
|
||||
@@ -87,77 +22,12 @@
|
||||
cameras -= c
|
||||
|
||||
for(var/turf/t in c.can_see())
|
||||
newVisibleTurfs[t] = t
|
||||
|
||||
// Removes turf that isn't in turfs.
|
||||
newVisibleTurfs &= turfs
|
||||
|
||||
var/list/visAdded = newVisibleTurfs - visibleTurfs
|
||||
var/list/visRemoved = visibleTurfs - newVisibleTurfs
|
||||
|
||||
visibleTurfs = newVisibleTurfs
|
||||
obscuredTurfs = turfs - newVisibleTurfs
|
||||
|
||||
for(var/turf in visAdded)
|
||||
var/turf/t = turf
|
||||
if(t.obscured)
|
||||
obscured -= t.obscured
|
||||
for(var/eye in seenby)
|
||||
var/mob/aiEye/m = eye
|
||||
if(!m || !m.ai)
|
||||
continue
|
||||
if(m.ai.client)
|
||||
m.ai.client.images -= t.obscured
|
||||
|
||||
for(var/turf in visRemoved)
|
||||
var/turf/t = turf
|
||||
if(obscuredTurfs[t])
|
||||
if(!t.obscured)
|
||||
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
|
||||
|
||||
obscured += t.obscured
|
||||
for(var/eye in seenby)
|
||||
var/mob/aiEye/m = eye
|
||||
if(!m || !m.ai)
|
||||
seenby -= m
|
||||
continue
|
||||
if(m.ai.client)
|
||||
m.ai.client.images += t.obscured
|
||||
visible[t] = t
|
||||
|
||||
// Create a new camera chunk, since the chunks are made as they are needed.
|
||||
|
||||
/datum/camerachunk/New(loc, x, y, z)
|
||||
|
||||
// 0xf = 15
|
||||
x &= ~0xf
|
||||
y &= ~0xf
|
||||
|
||||
src.x = x
|
||||
src.y = y
|
||||
src.z = z
|
||||
|
||||
/datum/chunk/camera/New(loc, x, y, z)
|
||||
for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z)))
|
||||
if(c.can_use())
|
||||
cameras += c
|
||||
|
||||
for(var/turf/t in range(10, locate(x + 8, y + 8, z)))
|
||||
if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16)
|
||||
turfs[t] = t
|
||||
|
||||
// At this point we only have functional cameras
|
||||
for(var/obj/machinery/camera/c in cameras)
|
||||
for(var/turf/t in c.can_see())
|
||||
visibleTurfs[t] = t
|
||||
|
||||
// Removes turf that isn't in turfs.
|
||||
visibleTurfs &= turfs
|
||||
|
||||
obscuredTurfs = turfs - visibleTurfs
|
||||
|
||||
for(var/turf in obscuredTurfs)
|
||||
var/turf/t = turf
|
||||
if(!t.obscured)
|
||||
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
|
||||
obscured += t.obscured
|
||||
|
||||
#undef UPDATE_BUFFER
|
||||
..()
|
||||
|
||||
@@ -3,99 +3,43 @@
|
||||
// A mob that the AI controls to look around the station with.
|
||||
// It streams chunks as it moves around, which will show it what the AI can and cannot see.
|
||||
|
||||
/mob/aiEye
|
||||
/mob/eye/aiEye
|
||||
name = "Inactive AI Eye"
|
||||
icon = 'icons/mob/AI.dmi'
|
||||
icon_state = "eye"
|
||||
alpha = 127
|
||||
var/list/visibleCameraChunks = list()
|
||||
var/mob/living/silicon/ai/ai = null
|
||||
density = 0
|
||||
status_flags = GODMODE // You can't damage it.
|
||||
see_in_dark = 7
|
||||
invisibility = INVISIBILITY_AI_EYE
|
||||
var/ghostimage = null
|
||||
icon_state = "AI-eye"
|
||||
|
||||
/mob/aiEye/New()
|
||||
ghostimage = image(src.icon,src,src.icon_state)
|
||||
ghost_darkness_images |= ghostimage //so ghosts can see the AI eye when they disable darkness
|
||||
ghost_sightless_images |= ghostimage //so ghosts can see the AI eye when they disable ghost sight
|
||||
updateallghostimages()
|
||||
/mob/eye/aiEye/New()
|
||||
..()
|
||||
visualnet = cameranet
|
||||
|
||||
mob/aiEye/Del()
|
||||
if (ghostimage)
|
||||
ghost_darkness_images -= ghostimage
|
||||
ghost_sightless_images -= ghostimage
|
||||
del(ghostimage)
|
||||
ghostimage = null;
|
||||
updateallghostimages()
|
||||
..()
|
||||
|
||||
// Movement code. Returns 0 to stop air movement from moving it.
|
||||
/mob/aiEye/Move()
|
||||
return 0
|
||||
|
||||
/mob/aiEye/examinate()
|
||||
set popup_menu = 0
|
||||
set src = usr.contents
|
||||
return 0
|
||||
|
||||
/mob/aiEye/pointed()
|
||||
set popup_menu = 0
|
||||
set src = usr.contents
|
||||
return 0
|
||||
|
||||
/mob/aiEye/examine(mob/user)
|
||||
|
||||
// Use this when setting the aiEye's location.
|
||||
// It will also stream the chunk that the new loc is in.
|
||||
/mob/aiEye/proc/setLoc(var/T, var/cancel_tracking = 1)
|
||||
|
||||
if(ai)
|
||||
if(!isturf(ai.loc))
|
||||
return
|
||||
|
||||
/mob/eye/aiEye/setLoc(var/T, var/cancel_tracking = 1)
|
||||
if(..())
|
||||
var/mob/living/silicon/ai/ai = owner
|
||||
if(cancel_tracking)
|
||||
ai.ai_cancel_tracking()
|
||||
|
||||
T = get_turf(T)
|
||||
loc = T
|
||||
cameranet.visibility(src)
|
||||
if(ai.client)
|
||||
ai.client.eye = src
|
||||
//Holopad
|
||||
if(ai.holo)
|
||||
ai.holo.move_hologram(ai)
|
||||
|
||||
/mob/aiEye/proc/getLoc()
|
||||
|
||||
if(ai)
|
||||
if(!isturf(ai.loc) || !ai.client)
|
||||
return
|
||||
return ai.eyeobj.loc
|
||||
return 1
|
||||
|
||||
// AI MOVEMENT
|
||||
|
||||
// The AI's "eye". Described on the top of the page.
|
||||
|
||||
/mob/living/silicon/ai
|
||||
var/mob/aiEye/eyeobj = new()
|
||||
var/sprint = 10
|
||||
var/cooldown = 0
|
||||
var/acceleration = 1
|
||||
eyeobj = new /mob/eye/aiEye()
|
||||
var/obj/machinery/hologram/holopad/holo = null
|
||||
|
||||
// Intiliaze the eye by assigning it's "ai" variable to us. Then set it's loc to us.
|
||||
/mob/living/silicon/ai/New()
|
||||
..()
|
||||
eyeobj.ai = src
|
||||
eyeobj.owner = src
|
||||
eyeobj.name = "[src.name] (AI Eye)" // Give it a name
|
||||
spawn(5)
|
||||
eyeobj.loc = src.loc
|
||||
|
||||
/mob/living/silicon/ai/Del()
|
||||
eyeobj.ai = null
|
||||
eyeobj.owner = null
|
||||
del(eyeobj) // No AI, no Eye
|
||||
..()
|
||||
|
||||
@@ -105,32 +49,6 @@ mob/aiEye/Del()
|
||||
if(AI.eyeobj && AI.client.eye == AI.eyeobj)
|
||||
AI.eyeobj.setLoc(src)
|
||||
|
||||
// This will move the AIEye. It will also cause lights near the eye to light up, if toggled.
|
||||
// This is handled in the proc below this one.
|
||||
|
||||
/client/proc/AIMove(n, direct, var/mob/living/silicon/ai/user)
|
||||
|
||||
var/initial = initial(user.sprint)
|
||||
var/max_sprint = 50
|
||||
|
||||
if(user.cooldown && user.cooldown < world.timeofday) // 3 seconds
|
||||
user.sprint = initial
|
||||
|
||||
for(var/i = 0; i < max(user.sprint, initial); i += 20)
|
||||
var/turf/step = get_turf(get_step(user.eyeobj, direct))
|
||||
if(step)
|
||||
user.eyeobj.setLoc(step)
|
||||
|
||||
user.cooldown = world.timeofday + 5
|
||||
if(user.acceleration)
|
||||
user.sprint = min(user.sprint + 0.5, max_sprint)
|
||||
else
|
||||
user.sprint = initial
|
||||
|
||||
//user.unset_machine() //Uncomment this if it causes problems.
|
||||
//user.lightNearbyCamera()
|
||||
|
||||
|
||||
// Return to the Core.
|
||||
|
||||
/mob/living/silicon/ai/proc/core()
|
||||
@@ -147,12 +65,12 @@ mob/aiEye/Del()
|
||||
if(!src.eyeobj)
|
||||
src << "ERROR: Eyeobj not found. Creating new eye..."
|
||||
src.eyeobj = new(src.loc)
|
||||
src.eyeobj.ai = src
|
||||
src.eyeobj.owner = src
|
||||
src.SetName(src.name)
|
||||
|
||||
if(client && client.eye)
|
||||
client.eye = src
|
||||
for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks)
|
||||
for(var/datum/chunk/c in eyeobj.visibleChunks)
|
||||
c.remove(eyeobj)
|
||||
src.eyeobj.setLoc(src)
|
||||
|
||||
@@ -160,5 +78,8 @@ mob/aiEye/Del()
|
||||
set category = "AI Commands"
|
||||
set name = "Toggle Camera Acceleration"
|
||||
|
||||
acceleration = !acceleration
|
||||
usr << "Camera acceleration has been toggled [acceleration ? "on" : "off"]."
|
||||
if(!eyeobj)
|
||||
return
|
||||
|
||||
eyeobj.acceleration = !eyeobj.acceleration
|
||||
usr << "Camera acceleration has been toggled [eyeobj.acceleration ? "on" : "off"]."
|
||||
|
||||
@@ -1,65 +1,5 @@
|
||||
#define BORG_CAMERA_BUFFER 30
|
||||
|
||||
//UPDATE TRIGGERS, when the chunk (and the surrounding chunks) should update.
|
||||
|
||||
// TURFS
|
||||
|
||||
/turf
|
||||
var/image/obscured
|
||||
|
||||
/turf/drain_power()
|
||||
return -1
|
||||
|
||||
/turf/proc/visibilityChanged()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
|
||||
/turf/simulated/Del()
|
||||
visibilityChanged()
|
||||
..()
|
||||
|
||||
/turf/simulated/New()
|
||||
..()
|
||||
visibilityChanged()
|
||||
|
||||
|
||||
|
||||
// STRUCTURES
|
||||
|
||||
/obj/structure/Del()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
..()
|
||||
|
||||
/obj/structure/New()
|
||||
..()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
|
||||
// EFFECTS
|
||||
|
||||
/obj/effect/Del()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
..()
|
||||
|
||||
/obj/effect/New()
|
||||
..()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
|
||||
|
||||
// DOORS
|
||||
|
||||
// Simply updates the visibility of the area when it opens/closes/destroyed.
|
||||
/obj/machinery/door/update_nearby_tiles(need_rebuild)
|
||||
. = ..(need_rebuild)
|
||||
// Glass door glass = 1
|
||||
// don't check then?
|
||||
if(!glass && cameranet)
|
||||
cameranet.updateVisibility(src, 0)
|
||||
|
||||
|
||||
// ROBOT MOVEMENT
|
||||
|
||||
// Update the portable camera everytime the Robot moves.
|
||||
|
||||
@@ -57,32 +57,32 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
if("name")
|
||||
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
|
||||
if(t)
|
||||
candidate.name = sanitize(copytext(t,1,MAX_NAME_LEN))
|
||||
candidate.name = sanitizeSafe(t, MAX_NAME_LEN)
|
||||
if("desc")
|
||||
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
|
||||
if(t)
|
||||
candidate.description = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
candidate.description = sanitize(t)
|
||||
if("role")
|
||||
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
|
||||
if(t)
|
||||
candidate.role = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
candidate.role = sanitize(t)
|
||||
if("ooc")
|
||||
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
|
||||
if(t)
|
||||
candidate.comments = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
candidate.comments = sanitize(t)
|
||||
if("save")
|
||||
candidate.savefile_save(usr)
|
||||
if("load")
|
||||
candidate.savefile_load(usr)
|
||||
//In case people have saved unsanitized stuff.
|
||||
if(candidate.name)
|
||||
candidate.name = sanitize(copytext(candidate.name,1,MAX_NAME_LEN))
|
||||
candidate.name = sanitizeSafe(candidate.name, MAX_NAME_LEN)
|
||||
if(candidate.description)
|
||||
candidate.description = sanitize(copytext(candidate.description,1,MAX_MESSAGE_LEN))
|
||||
candidate.description = sanitize(candidate.description)
|
||||
if(candidate.role)
|
||||
candidate.role = sanitize(copytext(candidate.role,1,MAX_MESSAGE_LEN))
|
||||
candidate.role = sanitize(candidate.role)
|
||||
if(candidate.comments)
|
||||
candidate.comments = sanitize(copytext(candidate.comments,1,MAX_MESSAGE_LEN))
|
||||
candidate.comments = sanitize(candidate.comments)
|
||||
|
||||
if("submit")
|
||||
if(candidate)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "repairbot"
|
||||
maxHealth = 35
|
||||
health = 35
|
||||
cell_emp_mult = 1
|
||||
universal_speak = 0
|
||||
universal_understand = 1
|
||||
gender = NEUTER
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
if(bruteloss<0) bruteloss = 0
|
||||
if(fireloss<0) fireloss = 0
|
||||
|
||||
/mob/living/silicon/robot/drone/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0)
|
||||
/mob/living/silicon/robot/drone/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/emp = 0)
|
||||
take_overall_damage(brute,burn)
|
||||
|
||||
/mob/living/silicon/robot/drone/heal_organ_damage(var/brute, var/burn)
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
var/obj/machinery/camera/camera = null
|
||||
|
||||
var/cell_emp_mult = 2
|
||||
|
||||
// Components are basically robot organs.
|
||||
var/list/components = list()
|
||||
|
||||
@@ -430,8 +432,8 @@
|
||||
|
||||
spawn(0)
|
||||
var/newname
|
||||
newname = input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text
|
||||
if (newname != "")
|
||||
newname = sanitizeSafe(input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
|
||||
if (newname)
|
||||
custom_name = newname
|
||||
|
||||
updatename()
|
||||
@@ -899,11 +901,6 @@
|
||||
//if they are holding or wearing a card that has access, that works
|
||||
if(check_access(H.get_active_hand()) || check_access(H.wear_id))
|
||||
return 1
|
||||
else if(istype(M, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/george = M
|
||||
//they can only hold things :(
|
||||
if(george.get_active_hand() && istype(george.get_active_hand(), /obj/item/weapon/card/id) && check_access(george.get_active_hand()))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/check_access(obj/item/weapon/card/id/I)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
var/datum/robot_component/picked = pick(parts)
|
||||
picked.heal_damage(brute,burn)
|
||||
|
||||
/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/edge = 0)
|
||||
/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/edge = 0, var/emp = 0)
|
||||
var/list/components = get_damageable_components()
|
||||
if(!components.len)
|
||||
return
|
||||
@@ -84,10 +84,11 @@
|
||||
burn -= absorb_burn
|
||||
src << "\red Your shield absorbs some of the impact!"
|
||||
|
||||
var/datum/robot_component/armour/A = get_armour()
|
||||
if(A)
|
||||
A.take_damage(brute,burn,sharp,edge)
|
||||
return
|
||||
if(!emp)
|
||||
var/datum/robot_component/armour/A = get_armour()
|
||||
if(A)
|
||||
A.take_damage(brute,burn,sharp,edge)
|
||||
return
|
||||
|
||||
var/datum/robot_component/C = pick(components)
|
||||
C.take_damage(brute,burn,sharp,edge)
|
||||
|
||||
@@ -124,11 +124,11 @@
|
||||
/obj/item/weapon/pen/robopen/proc/RenamePaper(mob/user as mob,obj/paper as obj)
|
||||
if ( !user || !paper )
|
||||
return
|
||||
var/n_name = input(user, "What would you like to label the paper?", "Paper Labelling", null) as text
|
||||
var/n_name = sanitizeSafe(input(user, "What would you like to label the paper?", "Paper Labelling", null) as text, 32)
|
||||
if ( !user || !paper )
|
||||
return
|
||||
|
||||
n_name = copytext(n_name, 1, 32)
|
||||
//n_name = copytext(n_name, 1, 32)
|
||||
if(( get_dist(user,paper) <= 1 && user.stat == 0))
|
||||
paper.name = "paper[(n_name ? text("- '[n_name]'") : null)]"
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src)
|
||||
RG.synths = list(metal, glass)
|
||||
src.modules += R
|
||||
src.modules += RG
|
||||
|
||||
/obj/item/weapon/robot_module/engineering
|
||||
name = "engineering robot module"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return 0
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
message = sanitize(message)
|
||||
|
||||
if (stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
@@ -49,10 +49,10 @@
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
src.take_organ_damage(20)
|
||||
src.take_organ_damage(0,20,emp=1)
|
||||
Stun(rand(5,10))
|
||||
if(2)
|
||||
src.take_organ_damage(10)
|
||||
src.take_organ_damage(0,10,emp=1)
|
||||
Stun(rand(1,5))
|
||||
flick("noise", src:flash)
|
||||
src << "\red <B>*BZZZT*</B>"
|
||||
@@ -235,14 +235,14 @@
|
||||
set desc = "Sets a description which will be shown when someone examines you."
|
||||
set category = "IC"
|
||||
|
||||
pose = sanitize(copytext(input(usr, "This is [src]. It is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
|
||||
pose = sanitize(input(usr, "This is [src]. It is...", "Pose", null) as text)
|
||||
|
||||
/mob/living/silicon/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 = sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text)
|
||||
|
||||
/mob/living/silicon/binarycheck()
|
||||
return 1
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
if(istype(src.loc,/mob/living/simple_animal/borer))
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
message = sanitize(message)
|
||||
if (!message)
|
||||
return
|
||||
log_say("[key_name(src)] : [message]")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/living/simple_animal/borer/say(var/message)
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
message = sanitize(message)
|
||||
message = capitalize(message)
|
||||
|
||||
if(!message)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/add_to = href_list["add_inv"]
|
||||
if(!usr.get_active_hand())
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/add_to = href_list["add_inv"]
|
||||
if(!usr.get_active_hand())
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
return
|
||||
|
||||
//Is the usr's mob type able to do this?
|
||||
if(ishuman(usr) || ismonkey(usr) || isrobot(usr))
|
||||
if(ishuman(usr) || issmall(usr) || isrobot(usr))
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
|
||||
@@ -360,12 +360,9 @@ var/list/slot_equipment_priority = list( \
|
||||
set src in usr
|
||||
if(usr != src)
|
||||
usr << "No."
|
||||
var/msg = input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null
|
||||
var/msg = sanitize(input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null, extra = 0)
|
||||
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
|
||||
flavor_text = msg
|
||||
|
||||
/mob/proc/warn_flavor_changed()
|
||||
|
||||
@@ -152,14 +152,6 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
|
||||
//
|
||||
world << "Shoes pass [passed]"
|
||||
*/ //
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/M = src
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(M.wear_mask && isobj(M.wear_mask))
|
||||
Cl = M.wear_mask
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
//world << "Mask pass [passed]"
|
||||
|
||||
if(!passed && spread_type == AIRBORNE && !internals)
|
||||
passed = (prob((50*virus.permeability_mod) - 1))
|
||||
|
||||
@@ -196,14 +196,14 @@
|
||||
if(M == assailant && state >= GRAB_AGGRESSIVE)
|
||||
|
||||
var/can_eat
|
||||
if((FAT in user.mutations) && ismonkey(affecting))
|
||||
if((FAT in user.mutations) && issmall(affecting))
|
||||
can_eat = 1
|
||||
else
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(H) && H.species.gluttonous)
|
||||
if(H.species.gluttonous == 2)
|
||||
can_eat = 2
|
||||
else if(!ishuman(affecting) && !ismonkey(affecting) && (affecting.small || iscarbon(affecting)))
|
||||
else if(!ishuman(affecting) && !issmall(affecting) && (affecting.small || iscarbon(affecting)))
|
||||
can_eat = 1
|
||||
|
||||
if(can_eat)
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
return istype(H.species, /datum/species/xenos)
|
||||
return 0
|
||||
|
||||
/proc/ismonkey(A)
|
||||
if(A && istype(A, /mob/living/carbon/monkey))
|
||||
return 1
|
||||
/proc/issmall(A)
|
||||
if(A && istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.species && H.species.is_small)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isbrain(A)
|
||||
@@ -257,7 +259,7 @@ var/list/global/organ_rel_size = list(
|
||||
for(var/obj/item/weapon/grab/G in target.grabbed_by)
|
||||
if(G.state >= GRAB_AGGRESSIVE)
|
||||
return zone
|
||||
|
||||
|
||||
var/miss_chance = 10
|
||||
if (zone in base_miss_chance)
|
||||
miss_chance = base_miss_chance[zone]
|
||||
@@ -340,7 +342,7 @@ proc/slur(phrase)
|
||||
n_letter = text("[n_letter]-[n_letter]")
|
||||
t = text("[t][n_letter]")//since the above is ran through for each letter, the text just adds up back to the original word.
|
||||
p++//for each letter p is increased to find where the next letter will be.
|
||||
return sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
return sanitize(t)
|
||||
|
||||
|
||||
proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added
|
||||
@@ -387,7 +389,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
n_letter = text("[n_letter]")
|
||||
t = text("[t][n_letter]")
|
||||
p=p+n_mod
|
||||
return sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
return sanitize(t)
|
||||
|
||||
|
||||
/proc/shake_camera(mob/M, duration, strength=1)
|
||||
@@ -462,7 +464,7 @@ var/list/intents = list("help","disarm","grab","hurt")
|
||||
if(hud_used && hud_used.action_intent)
|
||||
hud_used.action_intent.icon_state = "intent_[a_intent]"
|
||||
|
||||
else if(isrobot(src) || ismonkey(src))
|
||||
else if(isrobot(src))
|
||||
switch(input)
|
||||
if("help")
|
||||
a_intent = "help"
|
||||
|
||||
@@ -188,9 +188,9 @@
|
||||
|
||||
if(mob.stat==2) return
|
||||
|
||||
// handle possible AI movement
|
||||
if(isAI(mob))
|
||||
return AIMove(n,direct,mob)
|
||||
// handle possible Eye movement
|
||||
if(mob.eyeobj)
|
||||
return mob.EyeMove(n,direct)
|
||||
|
||||
if(mob.monkeyizing) return//This is sota the goto stop mobs from moving var
|
||||
|
||||
@@ -457,12 +457,12 @@
|
||||
var/area/A = turf.loc
|
||||
if(istype(A) && A.has_gravity == 0)
|
||||
var/can_walk = 0
|
||||
|
||||
|
||||
if(ishuman(src)) // Only humans can wear magboots, so we give them a chance to.
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP))
|
||||
can_walk = 1
|
||||
|
||||
|
||||
if(!can_walk)
|
||||
continue
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
message = strip_html_properly(message)
|
||||
message = sanitize(message)
|
||||
|
||||
set_typing_indicator(0)
|
||||
if(use_me)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user