Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
+12
View File
@@ -0,0 +1,12 @@
//Dead mobs can exist whenever. This is needful
/mob/dead/New(loc)
..()
if(!initialized)
args[1] = FALSE
Initialize(arglist(args)) //EXIST DAMN YOU!!!
/mob/dead/dust() //ghosts can't be vaporised.
return
/mob/dead/gib() //ghosts can't be gibbed.
return
@@ -1,4 +1,4 @@
/mob/new_player/Login()
/mob/dead/new_player/Login()
if(!mind)
mind = new /datum/mind(key)
mind.active = 1
@@ -7,13 +7,13 @@
..()
if(join_motd)
src << "<div class=\"motd\">[join_motd]</div>"
to_chat(src, "<div class=\"motd\">[join_motd]</div>")
if(admin_notice)
src << "<span class='notice'><b>Admin Notice:</b>\n \t [admin_notice]</span>"
to_chat(src, "<span class='notice'><b>Admin Notice:</b>\n \t [admin_notice]</span>")
if(config.soft_popcap && living_player_count() >= config.soft_popcap)
src << "<span class='notice'><b>Server Notice:</b>\n \t [config.soft_popcap_message]</span>"
to_chat(src, "<span class='notice'><b>Server Notice:</b>\n \t [config.soft_popcap_message]</span>")
sight |= SEE_TURFS
@@ -29,4 +29,4 @@
new_player_panel()
client.playtitlemusic()
if(ticker.current_state < GAME_STATE_SETTING_UP)
src << "Please set up your character and select \"Ready\". The game will start in about [round(ticker.GetTimeLeft()/10)] seconds."
to_chat(src, "Please set up your character and select \"Ready\". The game will start in about [round(ticker.GetTimeLeft(), 1)/10] seconds.")
@@ -1,4 +1,4 @@
/mob/new_player/Logout()
/mob/dead/new_player/Logout()
ready = 0
..()
if(!spawning)//Here so that if they are spawning and log out, the other procs can play out and they will have a mob to come back to.
@@ -1,6 +1,6 @@
/mob/new_player
/mob/dead/new_player
var/ready = 0
var/spawning = 0//Referenced when you want to delete the new_player later on in the code.
@@ -13,17 +13,25 @@
canmove = 0
anchored = 1 // don't get pushed around
var/mob/living/new_character //for instant transfer once the round is set up
/mob/new_player/New()
/mob/dead/new_player/Initialize()
if(initialized)
stack_trace("Warning: [src]([type]) initialized multiple times!")
initialized = TRUE
tag = "mob_[next_mob_id++]"
mob_list += src
if(client && ticker.state == GAME_STATE_STARTUP)
var/obj/screen/splash/S = new(client, TRUE, TRUE)
S.Fade(TRUE)
if(length(newplayer_start))
loc = pick(newplayer_start)
else
loc = locate(1,1,1)
/mob/new_player/proc/new_player_panel()
/mob/dead/new_player/proc/new_player_panel()
var/output = "<center><p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A></p>"
@@ -44,12 +52,12 @@
var/isadmin = 0
if(src.client && src.client.holder)
isadmin = 1
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[ckey]\")")
query.Execute()
var/DBQuery/query_get_new_polls = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[ckey]\")")
if(!query_get_new_polls.Execute())
return
var/newpoll = 0
while(query.NextRow())
if(query_get_new_polls.NextRow())
newpoll = 1
break
if(newpoll)
output += "<p><b><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A> (NEW!)</b></p>"
@@ -65,12 +73,12 @@
popup.open(0)
return
/mob/new_player/Stat()
/mob/dead/new_player/Stat()
..()
if(statpanel("Lobby"))
stat("Game Mode:", (ticker.hide_mode) ? "Secret" : "[master_mode]")
stat("Map:", MAP_NAME)
stat("Map:", SSmapping.config.map_name)
if(ticker.current_state == GAME_STATE_PREGAME)
var/time_remaining = ticker.GetTimeLeft()
@@ -83,7 +91,7 @@
stat("Players Ready:", "[ticker.totalPlayersReady]")
/mob/new_player/Topic(href, href_list[])
/mob/dead/new_player/Topic(href, href_list[])
if(src != usr)
return 0
@@ -121,11 +129,11 @@
observer.started_as_observer = 1
close_spawn_windows()
var/obj/O = locate("landmark*Observer-Start")
src << "<span class='notice'>Now teleporting.</span>"
to_chat(src, "<span class='notice'>Now teleporting.</span>")
if (O)
observer.loc = O.loc
else
src << "<span class='notice'>Teleporting failed. You should be able to use ghost verbs to teleport somewhere useful</span>"
to_chat(src, "<span class='notice'>Teleporting failed. The map is probably still loading...</span>")
observer.key = key
observer.client = client
observer.set_ghost_appearance()
@@ -141,7 +149,7 @@
if(href_list["late_join"])
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
usr << "<span class='danger'>The round is either not ready, or has already finished...</span>"
to_chat(usr, "<span class='danger'>The round is either not ready, or has already finished...</span>")
return
if(href_list["late_join"] == "override")
@@ -149,16 +157,16 @@
return
if(ticker.queued_players.len || (relevant_cap && living_player_count() >= relevant_cap && !(ckey(key) in admin_datums)))
usr << "<span class='danger'>[config.hard_popcap_message]</span>"
to_chat(usr, "<span class='danger'>[config.hard_popcap_message]</span>")
var/queue_position = ticker.queued_players.Find(usr)
if(queue_position == 1)
usr << "<span class='notice'>You are next in line to join the game. You will be notified when a slot opens up.</span>"
to_chat(usr, "<span class='notice'>You are next in line to join the game. You will be notified when a slot opens up.</span>")
else if(queue_position)
usr << "<span class='notice'>There are [queue_position-1] players in front of you in the queue to join the game.</span>"
to_chat(usr, "<span class='notice'>There are [queue_position-1] players in front of you in the queue to join the game.</span>")
else
ticker.queued_players += usr
usr << "<span class='notice'>You have been added to the queue to join the game. Your position in queue is [ticker.queued_players.len].</span>"
to_chat(usr, "<span class='notice'>You have been added to the queue to join the game. Your position in queue is [ticker.queued_players.len].</span>")
return
LateChoices()
@@ -168,12 +176,12 @@
if(href_list["SelectedJob"])
if(!enter_allowed)
usr << "<span class='notice'>There is an administrative lock on entering the game!</span>"
to_chat(usr, "<span class='notice'>There is an administrative lock on entering the game!</span>")
return
if(ticker.queued_players.len && !(ckey(key) in admin_datums))
if((living_player_count() >= relevant_cap) || (src != ticker.queued_players[1]))
usr << "<span class='warning'>Server is full.</span>"
to_chat(usr, "<span class='warning'>Server is full.</span>")
return
AttemptLateSpawn(href_list["SelectedJob"])
@@ -206,22 +214,22 @@
if(POLLTYPE_OPTION)
var/optionid = text2num(href_list["voteoptionid"])
if(vote_on_poll(pollid, optionid))
usr << "<span class='notice'>Vote successful.</span>"
to_chat(usr, "<span class='notice'>Vote successful.</span>")
else
usr << "<span class='danger'>Vote failed, please try again or contact an administrator.</span>"
to_chat(usr, "<span class='danger'>Vote failed, please try again or contact an administrator.</span>")
if(POLLTYPE_TEXT)
var/replytext = href_list["replytext"]
if(log_text_poll_reply(pollid, replytext))
usr << "<span class='notice'>Feedback logging successful.</span>"
to_chat(usr, "<span class='notice'>Feedback logging successful.</span>")
else
usr << "<span class='danger'>Feedback logging failed, please try again or contact an administrator.</span>"
to_chat(usr, "<span class='danger'>Feedback logging failed, please try again or contact an administrator.</span>")
if(POLLTYPE_RATING)
var/id_min = text2num(href_list["minid"])
var/id_max = text2num(href_list["maxid"])
if( (id_max - id_min) > 100 ) //Basic exploit prevention
//(protip, this stops no exploits)
usr << "The option ID difference is too big. Please contact administration or the database admin."
to_chat(usr, "The option ID difference is too big. Please contact administration or the database admin.")
return
for(var/optionid = id_min; optionid <= id_max; optionid++)
@@ -235,15 +243,15 @@
return
if(!vote_on_numval_poll(pollid, optionid, rating))
usr << "<span class='danger'>Vote failed, please try again or contact an administrator.</span>"
to_chat(usr, "<span class='danger'>Vote failed, please try again or contact an administrator.</span>")
return
usr << "<span class='notice'>Vote successful.</span>"
to_chat(usr, "<span class='notice'>Vote successful.</span>")
if(POLLTYPE_MULTI)
var/id_min = text2num(href_list["minoptionid"])
var/id_max = text2num(href_list["maxoptionid"])
if( (id_max - id_min) > 100 ) //Basic exploit prevention
usr << "The option ID difference is too big. Please contact administration or the database admin."
to_chat(usr, "The option ID difference is too big. Please contact administration or the database admin.")
return
for(var/optionid = id_min; optionid <= id_max; optionid++)
@@ -253,22 +261,22 @@
if(0)
continue
if(1)
usr << "<span class='danger'>Vote failed, please try again or contact an administrator.</span>"
to_chat(usr, "<span class='danger'>Vote failed, please try again or contact an administrator.</span>")
return
if(2)
usr << "<span class='danger'>Maximum replies reached.</span>"
to_chat(usr, "<span class='danger'>Maximum replies reached.</span>")
break
usr << "<span class='notice'>Vote successful.</span>"
to_chat(usr, "<span class='notice'>Vote successful.</span>")
if(POLLTYPE_IRV)
if (!href_list["IRVdata"])
src << "<span class='danger'>No ordering data found. Please try again or contact an administrator.</span>"
to_chat(src, "<span class='danger'>No ordering data found. Please try again or contact an administrator.</span>")
var/list/votelist = splittext(href_list["IRVdata"], ",")
if (!vote_on_irv_poll(pollid, votelist))
src << "<span class='danger'>Vote failed, please try again or contact an administrator.</span>"
to_chat(src, "<span class='danger'>Vote failed, please try again or contact an administrator.</span>")
return
src << "<span class='notice'>Vote successful.</span>"
to_chat(src, "<span class='notice'>Vote successful.</span>")
/mob/new_player/proc/IsJobAvailable(rank)
/mob/dead/new_player/proc/IsJobAvailable(rank)
var/datum/job/job = SSjob.GetJob(rank)
if(!job)
return 0
@@ -290,10 +298,20 @@
return 1
/mob/new_player/proc/AttemptLateSpawn(rank)
/mob/dead/new_player/proc/AttemptLateSpawn(rank)
if(!IsJobAvailable(rank))
src << alert("[rank] is not available. Please try another.")
alert(src, "[rank] is not available. Please try another.")
return 0
if(ticker.late_join_disabled)
alert(src, "An administrator has disabled late join spawning.")
return FALSE
if(SSshuttle.arrivals)
close_spawn_windows() //In case we get held up
if(SSshuttle.arrivals.damaged && config.arrivals_shuttle_require_safe_latejoin)
src << alert("The arrivals shuttle is currently malfunctioning! You cannot join.")
return FALSE
//Remove the player from the join queue if he was in one and reset the timer
ticker.queued_players -= src
@@ -301,13 +319,14 @@
SSjob.AssignRole(src, rank, 1)
var/mob/living/character = create_character() //creates the human and transfers vars and mind
var/mob/living/character = create_character(TRUE) //creates the human and transfers vars and mind
var/equip = SSjob.EquipRank(character, rank, 1)
if(iscyborg(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob.
if(isliving(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob.
character = equip
var/D = pick(latejoin)
var/D
if(latejoin.len)
D = get_turf(pick(latejoin))
if(!D)
for(var/turf/T in get_area_turfs(/area/shuttle/arrival))
if(!T.density)
@@ -321,6 +340,12 @@
continue
character.loc = D
character.update_parallax_teleport()
var/atom/movable/chair = locate(/obj/structure/chair) in character.loc
if(chair)
chair.buckle_mob(character)
ticker.minds += character.mind
var/mob/living/carbon/human/humanc
@@ -329,10 +354,13 @@
if(humanc) //These procs all expect humans
data_core.manifest_inject(humanc)
AnnounceArrival(humanc, rank)
if(SSshuttle.arrivals)
SSshuttle.arrivals.QueueAnnounce(humanc, rank)
else
AnnounceArrival(humanc, rank)
AddEmploymentContract(humanc)
if(highlander)
humanc << "<span class='userdanger'><i>THERE CAN BE ONLY ONE!!!</i></span>"
to_chat(humanc, "<span class='userdanger'><i>THERE CAN BE ONLY ONE!!!</i></span>")
humanc.make_scottish()
joined_player_list += character.ckey
@@ -347,23 +375,7 @@
ticker.mode.make_antag_chance(humanc)
qdel(src)
/mob/new_player/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
if(ticker.current_state != GAME_STATE_PLAYING)
return
var/area/A = get_area(character)
var/message = "<span class='game deadsay'><span class='name'>\
[character.real_name]</span> ([rank]) has arrived at the station at \
<span class='name'>[A.name]</span>.</span>"
deadchat_broadcast(message, follow_target = character, message_type=DEADCHAT_ARRIVALRATTLE)
if((!announcement_systems.len) || (!character.mind))
return
if((character.mind.assigned_role == "Cyborg") || (character.mind.assigned_role == character.mind.special_role))
return
var/obj/machinery/announcement_system/announcer = pick(announcement_systems)
announcer.announce("ARRIVAL", character.real_name, rank, list()) //make the list empty to make it announce it in common
/mob/new_player/proc/AddEmploymentContract(mob/living/carbon/human/employee)
/mob/dead/new_player/proc/AddEmploymentContract(mob/living/carbon/human/employee)
//TODO: figure out a way to exclude wizards/nukeops/demons from this.
sleep(30)
for(var/C in employmentCabinets)
@@ -372,7 +384,7 @@
employmentCabinet.addFile(employee)
/mob/new_player/proc/LateChoices()
/mob/dead/new_player/proc/LateChoices()
var/mills = world.time - round_start_time // 1/10 of a second, not real milliseconds but whatever
//var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something
var/mins = (mills % 36000) / 600
@@ -393,6 +405,17 @@
if(job && IsJobAvailable(job.title))
available_job_count++;
if(length(SSjob.prioritized_jobs))
dat += "<div class='notice red'>The station has flagged these jobs as high priority:<br>"
var/amt = length(SSjob.prioritized_jobs)
var/amt_count
for(var/datum/job/a in SSjob.prioritized_jobs)
amt_count++
if(amt_count != amt) // checks for the last job added.
dat += " [a.title], "
else
dat += " [a.title]. </div>"
dat += "<div class='clearBoth'>Choose from the following open positions:</div><br>"
dat += "<div class='jobs'><div class='jobsColumn'>"
var/job_count = 0
@@ -422,40 +445,46 @@
popup.open(0) // 0 is passed to open so that it doesn't use the onclose() proc
/mob/new_player/proc/create_character()
/mob/dead/new_player/proc/create_character(transfer_after)
spawning = 1
close_spawn_windows()
var/mob/living/carbon/human/new_character = new(loc)
var/mob/living/carbon/human/H = new(loc)
if(config.force_random_names || jobban_isbanned(src, "appearance"))
client.prefs.random_character()
client.prefs.real_name = client.prefs.pref_species.random_name(gender,1)
client.prefs.copy_to(new_character)
new_character.dna.update_dna_identity()
client.prefs.copy_to(H)
H.dna.update_dna_identity()
if(mind)
mind.active = 0 //we wish to transfer the key manually
mind.transfer_to(new_character) //won't transfer key since the mind is not active
mind.transfer_to(H) //won't transfer key since the mind is not active
new_character.name = real_name
H.name = real_name
new_character.key = key //Manually transfer the key to log them in
new_character.stopLobbySound()
. = H
new_character = .
if(transfer_after)
transfer_character()
return new_character
/mob/dead/new_player/proc/transfer_character()
. = new_character
if(.)
new_character.key = key //Manually transfer the key to log them in
new_character.stopLobbySound()
/mob/new_player/proc/ViewManifest()
/mob/dead/new_player/proc/ViewManifest()
var/dat = "<html><body>"
dat += "<h4>Crew Manifest</h4>"
dat += data_core.get_manifest(OOC = 1)
src << browse(dat, "window=manifest;size=387x420;can_close=1")
/mob/new_player/Move()
/mob/dead/new_player/Move()
return 0
/mob/new_player/proc/close_spawn_windows()
/mob/dead/new_player/proc/close_spawn_windows()
src << browse(null, "window=latechoices") //closes late choices window
src << browse(null, "window=playersetup") //closes the player setup window
@@ -2,67 +2,59 @@
var/optionid
var/optiontext
/mob/new_player/proc/handle_player_polling()
/mob/dead/new_player/proc/handle_player_polling()
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
var/DBQuery/query_get_poll = dbcon.NewQuery("SELECT id, question FROM [format_table_name("poll_question")] WHERE Now() BETWEEN starttime AND endtime [(client.holder ? "" : "AND adminonly = false")]")
if(!query_get_poll.Execute())
var/err = query_get_poll.ErrorMsg()
log_game("SQL ERROR obtaining id, question from poll_question table. Error : \[[err]\]\n")
var/DBQuery/query_poll_get = dbcon.NewQuery("SELECT id, question FROM [format_table_name("poll_question")] WHERE Now() BETWEEN starttime AND endtime [(client.holder ? "" : "AND adminonly = false")]")
if(!query_poll_get.warn_execute())
return
var/output = "<div align='center'><B>Player polls</B><hr><table>"
var/i = 0
while(query_get_poll.NextRow())
var/pollid = query_get_poll.item[1]
var/pollquestion = query_get_poll.item[2]
while(query_poll_get.NextRow())
var/pollid = query_poll_get.item[1]
var/pollquestion = query_poll_get.item[2]
output += "<tr bgcolor='#[ (i % 2 == 1) ? "e2e2e2" : "e2e2e2" ]'><td><a href=\"byond://?src=\ref[src];pollid=[pollid]\"><b>[pollquestion]</b></a></td></tr>"
i++
output += "</table>"
src << browse(output,"window=playerpolllist;size=500x300")
/mob/new_player/proc/poll_player(pollid)
/mob/dead/new_player/proc/poll_player(pollid)
if(!pollid)
return
if (!dbcon.Connect())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid]")
if(!select_query.Execute())
var/err = select_query.ErrorMsg()
log_game("SQL ERROR obtaining starttime, endtime, question, polltype, multiplechoiceoptions from poll_question table. Error : \[[err]\]\n")
var/DBQuery/query_poll_get_details = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid]")
if(!query_poll_get_details.warn_execute())
return
var/pollstarttime = ""
var/pollendtime = ""
var/pollquestion = ""
var/polltype = ""
var/multiplechoiceoptions = 0
if(select_query.NextRow())
pollstarttime = select_query.item[1]
pollendtime = select_query.item[2]
pollquestion = select_query.item[3]
polltype = select_query.item[4]
multiplechoiceoptions = text2num(select_query.item[5])
if(query_poll_get_details.NextRow())
pollstarttime = query_poll_get_details.item[1]
pollendtime = query_poll_get_details.item[2]
pollquestion = query_poll_get_details.item[3]
polltype = query_poll_get_details.item[4]
multiplechoiceoptions = text2num(query_poll_get_details.item[5])
switch(polltype)
if(POLLTYPE_OPTION)
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!voted_query.Execute())
var/err = voted_query.ErrorMsg()
log_game("SQL ERROR obtaining optionid from poll_vote table. Error : \[[err]\]\n")
var/DBQuery/query_option_get_votes = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!query_option_get_votes.warn_execute())
return
var/votedoptionid = 0
if(voted_query.NextRow())
votedoptionid = text2num(voted_query.item[1])
if(query_option_get_votes.NextRow())
votedoptionid = text2num(query_option_get_votes.item[1])
var/list/datum/polloption/options = list()
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
if(!options_query.Execute())
var/err = options_query.ErrorMsg()
log_game("SQL ERROR obtaining id, text from poll_option table. Error : \[[err]\]\n")
var/DBQuery/query_option_options = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
if(!query_option_options.warn_execute())
return
while(options_query.NextRow())
while(query_option_options.NextRow())
var/datum/polloption/PO = new()
PO.optionid = text2num(options_query.item[1])
PO.optiontext = options_query.item[2]
PO.optionid = text2num(query_option_options.item[1])
PO.optiontext = query_option_options.item[2]
options += PO
var/output = "<div align='center'><B>Player poll</B><hr>"
output += "<b>Question: [pollquestion]</b><br>"
@@ -90,14 +82,12 @@
src << browse(null ,"window=playerpolllist")
src << browse(output,"window=playerpoll;size=500x250")
if(POLLTYPE_TEXT)
var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!voted_query.Execute())
var/err = voted_query.ErrorMsg()
log_game("SQL ERROR obtaining replytext from poll_textreply table. Error : \[[err]\]\n")
var/DBQuery/query_text_get_votes = dbcon.NewQuery("SELECT replytext FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!query_text_get_votes.warn_execute())
return
var/vote_text = ""
if(voted_query.NextRow())
vote_text = voted_query.item[1]
if(query_text_get_votes.NextRow())
vote_text = query_text_get_votes.item[1]
var/output = "<div align='center'><B>Player poll</B><hr>"
output += "<b>Question: [pollquestion]</b><br>"
output += "<font size='2'>Feedback gathering runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
@@ -121,18 +111,16 @@
src << browse(null ,"window=playerpolllist")
src << browse(output,"window=playerpoll;size=500x500")
if(POLLTYPE_RATING)
var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM [format_table_name("poll_option")] o, [format_table_name("poll_vote")] v WHERE o.pollid = [pollid] AND v.ckey = '[ckey]' AND o.id = v.optionid")
if(!voted_query.Execute())
var/err = voted_query.ErrorMsg()
log_game("SQL ERROR obtaining o.text, v.rating from poll_option and poll_vote tables. Error : \[[err]\]\n")
var/DBQuery/query_rating_get_votes = dbcon.NewQuery("SELECT o.text, v.rating FROM [format_table_name("poll_option")] o, [format_table_name("poll_vote")] v WHERE o.pollid = [pollid] AND v.ckey = '[ckey]' AND o.id = v.optionid")
if(!query_rating_get_votes.warn_execute())
return
var/output = "<div align='center'><B>Player poll</B><hr>"
output += "<b>Question: [pollquestion]</b><br>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
var/rating
while(voted_query.NextRow())
var/optiontext = voted_query.item[1]
rating = voted_query.item[2]
while(query_rating_get_votes.NextRow())
var/optiontext = query_rating_get_votes.item[1]
rating = query_rating_get_votes.item[2]
output += "<br><b>[optiontext] - [rating]</b>"
if(!rating)
output += "<form name='cardcomp' action='?src=\ref[src]' method='get'>"
@@ -141,19 +129,17 @@
output += "<input type='hidden' name='votetype' value=[POLLTYPE_RATING]>"
var/minid = 999999
var/maxid = 0
var/DBQuery/option_query = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
if(!option_query.Execute())
var/err = option_query.ErrorMsg()
log_game("SQL ERROR obtaining id, text, minval, maxval, descmin, descmid, descmax from poll_option table. Error : \[[err]\]\n")
var/DBQuery/query_rating_options = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
if(!query_rating_options.warn_execute())
return
while(option_query.NextRow())
var/optionid = text2num(option_query.item[1])
var/optiontext = option_query.item[2]
var/minvalue = text2num(option_query.item[3])
var/maxvalue = text2num(option_query.item[4])
var/descmin = option_query.item[5]
var/descmid = option_query.item[6]
var/descmax = option_query.item[7]
while(query_rating_options.NextRow())
var/optionid = text2num(query_rating_options.item[1])
var/optiontext = query_rating_options.item[2]
var/minvalue = text2num(query_rating_options.item[3])
var/maxvalue = text2num(query_rating_options.item[4])
var/descmin = query_rating_options.item[5]
var/descmid = query_rating_options.item[6]
var/descmax = query_rating_options.item[7]
if(optionid < minid)
minid = optionid
if(optionid > maxid)
@@ -177,26 +163,22 @@
src << browse(null ,"window=playerpolllist")
src << browse(output,"window=playerpoll;size=500x500")
if(POLLTYPE_MULTI)
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!voted_query.Execute())
var/err = voted_query.ErrorMsg()
log_game("SQL ERROR obtaining optionid from poll_vote table. Error : \[[err]\]\n")
var/DBQuery/query_multi_get_votes = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!query_multi_get_votes.warn_execute())
return
var/list/votedfor = list()
while(voted_query.NextRow())
votedfor.Add(text2num(voted_query.item[1]))
while(query_multi_get_votes.NextRow())
votedfor.Add(text2num(query_multi_get_votes.item[1]))
var/list/datum/polloption/options = list()
var/maxoptionid = 0
var/minoptionid = 0
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
if(!options_query.Execute())
var/err = options_query.ErrorMsg()
log_game("SQL ERROR obtaining id, text from poll_option table. Error : \[[err]\]\n")
var/DBQuery/query_multi_options = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
if(!query_multi_options.warn_execute())
return
while(options_query.NextRow())
while(query_multi_options.NextRow())
var/datum/polloption/PO = new()
PO.optionid = text2num(options_query.item[1])
PO.optiontext = options_query.item[2]
PO.optionid = text2num(query_multi_options.item[1])
PO.optiontext = query_multi_options.item[2]
if(PO.optionid > maxoptionid)
maxoptionid = PO.optionid
if(PO.optionid < minoptionid || !minoptionid)
@@ -232,27 +214,23 @@
var/datum/asset/irv_assets = get_asset_datum(/datum/asset/simple/IRV)
irv_assets.send(src)
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!voted_query.Execute())
var/err = voted_query.ErrorMsg()
log_game("SQL ERROR obtaining optionid from poll_vote table. Error : \[[err]\]\n")
var/DBQuery/query_irv_get_votes = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!query_irv_get_votes.warn_execute())
return
var/list/votedfor = list()
while(voted_query.NextRow())
votedfor.Add(text2num(voted_query.item[1]))
while(query_irv_get_votes.NextRow())
votedfor.Add(text2num(query_irv_get_votes.item[1]))
var/list/datum/polloption/options = list()
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
if(!options_query.Execute())
var/err = options_query.ErrorMsg()
log_game("SQL ERROR obtaining id, text from poll_option table. Error : \[[err]\]\n")
var/DBQuery/query_irv_options = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
if(!query_irv_options.warn_execute())
return
while(options_query.NextRow())
while(query_irv_options.NextRow())
var/datum/polloption/PO = new()
PO.optionid = text2num(options_query.item[1])
PO.optiontext = options_query.item[2]
PO.optionid = text2num(query_irv_options.item[1])
PO.optiontext = query_irv_options.item[2]
options["[PO.optionid]"] += PO
//if they already voted, use their sort
@@ -345,20 +323,18 @@
src << browse(output,"window=playerpoll;size=500x500")
return
/mob/new_player/proc/poll_check_voted(pollid, text = FALSE)
/mob/dead/new_player/proc/poll_check_voted(pollid, text = FALSE)
var/table = "poll_vote"
if (text)
table = "poll_textreply"
if (!dbcon.Connect())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
var/DBQuery/query_hasvoted = dbcon.NewQuery("SELECT id FROM `[format_table_name(table)]` WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!query_hasvoted.Execute())
var/err = query_hasvoted.ErrorMsg()
log_game("SQL ERROR obtaining id from [table] table. Error : \[[err]\]\n")
if(!query_hasvoted.warn_execute())
return
if(query_hasvoted.NextRow())
usr << "<span class='danger'>You've already replied to this poll.</span>"
to_chat(usr, "<span class='danger'>You've already replied to this poll.</span>")
return
. = "Player"
if(client.holder)
@@ -366,38 +342,36 @@
return .
/mob/new_player/proc/vote_rig_check()
/mob/dead/new_player/proc/vote_rig_check()
if (usr != src)
if (!usr || !src)
return 0
//we gots ourselfs a dirty cheater on our hands!
log_game("[key_name(usr)] attempted to rig the vote by voting as [ckey]")
message_admins("[key_name_admin(usr)] attempted to rig the vote by voting as [ckey]")
usr << "<span class='danger'>You don't seem to be [ckey].</span>"
src << "<span class='danger'>Something went horribly wrong processing your vote. Please contact an administrator, they should have gotten a message about this</span>"
to_chat(usr, "<span class='danger'>You don't seem to be [ckey].</span>")
to_chat(src, "<span class='danger'>Something went horribly wrong processing your vote. Please contact an administrator, they should have gotten a message about this</span>")
return 0
return 1
/mob/new_player/proc/vote_valid_check(pollid, holder, type)
/mob/dead/new_player/proc/vote_valid_check(pollid, holder, type)
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
pollid = text2num(pollid)
if (!pollid || pollid < 0)
return 0
//validate the poll is actually the right type of poll and its still active
var/DBQuery/select_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime AND polltype = '[type]' [(holder ? "" : "AND adminonly = false")]")
if (!select_query.Execute())
var/err = select_query.ErrorMsg()
log_game("SQL ERROR validating poll via poll_question table. Error : \[[err]\]\n")
var/DBQuery/query_validate_poll = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime AND polltype = '[type]' [(holder ? "" : "AND adminonly = false")]")
if(!query_validate_poll.warn_execute())
return 0
if (!select_query.NextRow())
if (!query_validate_poll.NextRow())
return 0
return 1
/mob/new_player/proc/vote_on_irv_poll(pollid, list/votelist)
/mob/dead/new_player/proc/vote_on_irv_poll(pollid, list/votelist)
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
if (!vote_rig_check())
return 0
@@ -421,14 +395,12 @@
return 0
//lets collect the options
var/DBQuery/options_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
if (!options_query.Execute())
var/err = options_query.ErrorMsg()
log_game("SQL ERROR obtaining id from poll_option table. Error : \[[err]\]\n")
var/DBQuery/query_irv_id = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
if(!query_irv_id.warn_execute())
return 0
var/list/optionlist = list()
while (options_query.NextRow())
optionlist += text2num(options_query.item[1])
while (query_irv_id.NextRow())
optionlist += text2num(query_irv_id.item[1])
//validate their votes are actually in the list of options and actually numbers
var/list/numberedvotelist = list()
@@ -436,13 +408,13 @@
vote = text2num(vote)
numberedvotelist += vote
if (!vote) //this is fine because voteid starts at 1, so it will never be 0
src << "<span class='danger'>Error: Invalid (non-numeric) votes in the vote data.</span>"
to_chat(src, "<span class='danger'>Error: Invalid (non-numeric) votes in the vote data.</span>")
return 0
if (!(vote in optionlist))
src << "<span class='danger'>Votes for choices that do not appear to be in the poll detected<span>"
to_chat(src, "<span class='danger'>Votes for choices that do not appear to be in the poll detected<span>")
return 0
if (!numberedvotelist.len)
src << "<span class='danger'>Invalid vote data</span>"
to_chat(src, "<span class='danger'>Invalid vote data</span>")
return 0
//lets add the vote, first we generate a insert statement.
@@ -454,26 +426,21 @@
sqlrowlist += "(Now(), [pollid], [vote], '[sanitizeSQL(ckey)]', INET_ATON('[sanitizeSQL(address)]'), '[sanitizeSQL(rank)]')"
//now lets delete their old votes (if any)
var/DBQuery/voted_query = dbcon.NewQuery("DELETE FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if (!voted_query.Execute())
var/err = voted_query.ErrorMsg()
log_game("SQL ERROR clearing out old votes. Error : \[[err]\]\n")
var/DBQuery/query_irv_del_old = dbcon.NewQuery("DELETE FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!query_irv_del_old.warn_execute())
return 0
//now to add the new ones.
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime, pollid, optionid, ckey, ip, adminrank) VALUES [sqlrowlist]")
if(!query_insert.Execute())
var/err = query_insert.ErrorMsg()
log_game("SQL ERROR adding vote to table. Error : \[[err]\]\n")
src << "<span class='danger'>Error adding vote.</span>"
var/DBQuery/query_irv_vote = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime, pollid, optionid, ckey, ip, adminrank) VALUES [sqlrowlist]")
if(!query_irv_vote.warn_execute())
return 0
src << browse(null,"window=playerpoll")
return 1
/mob/new_player/proc/vote_on_poll(pollid, optionid)
/mob/dead/new_player/proc/vote_on_poll(pollid, optionid)
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
if (!vote_rig_check())
return 0
@@ -485,17 +452,15 @@
var/adminrank = sanitizeSQL(poll_check_voted(pollid))
if(!adminrank)
return
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime, pollid, optionid, ckey, ip, adminrank) VALUES (Now(), [pollid], [optionid], '[ckey]', INET_ATON('[client.address]'), '[adminrank]')")
if(!query_insert.Execute())
var/err = query_insert.ErrorMsg()
log_game("SQL ERROR adding vote to table. Error : \[[err]\]\n")
var/DBQuery/query_option_vote = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime, pollid, optionid, ckey, ip, adminrank) VALUES (Now(), [pollid], [optionid], '[ckey]', INET_ATON('[client.address]'), '[adminrank]')")
if(!query_option_vote.warn_execute())
return
usr << browse(null,"window=playerpoll")
return 1
/mob/new_player/proc/log_text_poll_reply(pollid, replytext)
/mob/dead/new_player/proc/log_text_poll_reply(pollid, replytext)
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
if (!vote_rig_check())
return 0
@@ -505,26 +470,24 @@
if (!vote_valid_check(pollid, client.holder, POLLTYPE_TEXT))
return 0
if(!replytext)
usr << "The text you entered was blank. Please correct the text and submit again."
to_chat(usr, "The text you entered was blank. Please correct the text and submit again.")
return
var/adminrank = sanitizeSQL(poll_check_voted(pollid, TRUE))
if(!adminrank)
return
replytext = sanitizeSQL(replytext)
if(!(length(replytext) > 0) || !(length(replytext) <= 8000))
usr << "The text you entered was invalid or too long. Please correct the text and submit again."
to_chat(usr, "The text you entered was invalid or too long. Please correct the text and submit again.")
return
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_textreply")] (datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (Now(), [pollid], '[ckey]', INET_ATON('[client.address]'), '[replytext]', '[adminrank]')")
if(!query_insert.Execute())
var/err = query_insert.ErrorMsg()
log_game("SQL ERROR adding text reply to table. Error : \[[err]\]\n")
var/DBQuery/query_text_vote = dbcon.NewQuery("INSERT INTO [format_table_name("poll_textreply")] (datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (Now(), [pollid], '[ckey]', INET_ATON('[client.address]'), '[replytext]', '[adminrank]')")
if(!query_text_vote.warn_execute())
return
usr << browse(null,"window=playerpoll")
return 1
/mob/new_player/proc/vote_on_numval_poll(pollid, optionid, rating)
/mob/dead/new_player/proc/vote_on_numval_poll(pollid, optionid, rating)
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
if (!vote_rig_check())
return 0
@@ -533,29 +496,25 @@
//validate the poll
if (!vote_valid_check(pollid, client.holder, POLLTYPE_RATING))
return 0
var/DBQuery/query_hasvoted = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE optionid = [optionid] AND ckey = '[ckey]'")
if(!query_hasvoted.Execute())
var/err = query_hasvoted.ErrorMsg()
log_game("SQL ERROR obtaining id from poll_vote table. Error : \[[err]\]\n")
var/DBQuery/query_numval_hasvoted = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE optionid = [optionid] AND ckey = '[ckey]'")
if(!query_numval_hasvoted.warn_execute())
return
if(query_hasvoted.NextRow())
usr << "<span class='danger'>You've already replied to this poll.</span>"
if(query_numval_hasvoted.NextRow())
to_chat(usr, "<span class='danger'>You've already replied to this poll.</span>")
return
var/adminrank = "Player"
if(client.holder)
adminrank = client.holder.rank.name
adminrank = sanitizeSQL(adminrank)
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (Now(), [pollid], [optionid], '[ckey]', INET_ATON('[client.address]'), '[adminrank]', [(isnull(rating)) ? "null" : rating])")
if(!query_insert.Execute())
var/err = query_insert.ErrorMsg()
log_game("SQL ERROR adding vote to table. Error : \[[err]\]\n")
var/DBQuery/query_numval_vote = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (Now(), [pollid], [optionid], '[ckey]', INET_ATON('[client.address]'), '[adminrank]', [(isnull(rating)) ? "null" : rating])")
if(!query_numval_vote.warn_execute())
return
usr << browse(null,"window=playerpoll")
return 1
/mob/new_player/proc/vote_on_multi_poll(pollid, optionid)
/mob/dead/new_player/proc/vote_on_multi_poll(pollid, optionid)
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return 0
if (!vote_rig_check())
return 0
@@ -564,21 +523,17 @@
//validate the poll
if (!vote_valid_check(pollid, client.holder, POLLTYPE_MULTI))
return 0
var/DBQuery/query_get_choicelen = dbcon.NewQuery("SELECT multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid]")
if(!query_get_choicelen.Execute())
var/err = query_get_choicelen.ErrorMsg()
log_game("SQL ERROR obtaining multiplechoiceoptions from poll_question table. Error : \[[err]\]\n")
var/DBQuery/query_multi_choicelen = dbcon.NewQuery("SELECT multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid]")
if(!query_multi_choicelen.warn_execute())
return 1
var/i
if(query_get_choicelen.NextRow())
i = text2num(query_get_choicelen.item[1])
var/DBQuery/query_hasvoted = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!query_hasvoted.Execute())
var/err = query_hasvoted.ErrorMsg()
log_game("SQL ERROR obtaining id from poll_vote table. Error : \[[err]\]\n")
if(query_multi_choicelen.NextRow())
i = text2num(query_multi_choicelen.item[1])
var/DBQuery/query_multi_hasvoted = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
if(!query_multi_hasvoted.warn_execute())
return 1
while(i)
if(query_hasvoted.NextRow())
if(query_multi_hasvoted.NextRow())
i--
else
break
@@ -588,10 +543,8 @@
if(client.holder)
adminrank = client.holder.rank.name
adminrank = sanitizeSQL(adminrank)
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime, pollid, optionid, ckey, ip, adminrank) VALUES (Now(), [pollid], [optionid], '[ckey]', INET_ATON('[client.address]'), '[adminrank]')")
if(!query_insert.Execute())
var/err = query_insert.ErrorMsg()
log_game("SQL ERROR adding vote to table. Error : \[[err]\]\n")
var/DBQuery/query_multi_vote = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime, pollid, optionid, ckey, ip, adminrank) VALUES (Now(), [pollid], [optionid], '[ckey]', INET_ATON('[client.address]'), '[adminrank]')")
if(!query_multi_vote.warn_execute())
return 1
usr << browse(null,"window=playerpoll")
return 0
@@ -5,6 +5,9 @@
gender = gender_override
else
gender = pick(MALE,FEMALE)
underwear = random_underwear(gender)
undershirt = random_undershirt(gender)
socks = random_socks()
skin_tone = random_skin_tone()
hair_style = random_hair_style(gender)
facial_hair_style = random_facial_hair_style(gender)
@@ -17,13 +20,8 @@
features = random_features()
age = rand(AGE_MIN,AGE_MAX)
/datum/preferences/proc/update_preview_icon(nude=FALSE)
/datum/preferences/proc/update_preview_icon()
// Silicons only need a very basic preview since there is no customization for them.
var/wide_icon = 0
var/stamp_x = 0
var/stamp_y = 1
if(features["taur"] != "None")
wide_icon = 1
if(job_engsec_high)
switch(job_engsec_high)
if(AI)
@@ -42,56 +40,45 @@
// Determine what job is marked as 'High' priority, and dress them up as such.
var/datum/job/previewJob
var/highRankFlag = job_civilian_high | job_medsci_high | job_engsec_high
if(!nude)
if(job_civilian_low & ASSISTANT)
previewJob = SSjob.GetJob("Assistant")
else if(highRankFlag)
var/highDeptFlag
if(job_civilian_high)
highDeptFlag = CIVILIAN
else if(job_medsci_high)
highDeptFlag = MEDSCI
else if(job_engsec_high)
highDeptFlag = ENGSEC
for(var/datum/job/job in SSjob.occupations)
if(job.flag == highRankFlag && job.department_flag == highDeptFlag)
previewJob = job
break
if(job_civilian_low & ASSISTANT)
previewJob = SSjob.GetJob("Assistant")
else if(highRankFlag)
var/highDeptFlag
if(job_civilian_high)
highDeptFlag = CIVILIAN
else if(job_medsci_high)
highDeptFlag = MEDSCI
else if(job_engsec_high)
highDeptFlag = ENGSEC
for(var/datum/job/job in SSjob.occupations)
if(job.flag == highRankFlag && job.department_flag == highDeptFlag)
previewJob = job
break
if(previewJob)
mannequin.job = previewJob.title
previewJob.equip(mannequin, TRUE)
CHECK_TICK
preview_icon = icon('icons/effects/effects.dmi', "nothing")
preview_icon.Scale((112), (32))
preview_icon.Scale(48+32, 16+32)
CHECK_TICK
mannequin.setDir(NORTH)
var/icon/stamp = getFlatIcon(mannequin)
if(wide_icon)
stamp_x = 16
else
stamp_x = 32
CHECK_TICK
preview_icon.Blend(stamp, ICON_OVERLAY, stamp_x, stamp_y)
preview_icon.Blend(stamp, ICON_OVERLAY, 25, 17)
CHECK_TICK
mannequin.setDir(WEST)
stamp = getFlatIcon(mannequin)
if(wide_icon)
stamp_x = 48
else
stamp_x = 64
CHECK_TICK
preview_icon.Blend(stamp, ICON_OVERLAY, stamp_x, stamp_y)
preview_icon.Blend(stamp, ICON_OVERLAY, 1, 9)
CHECK_TICK
mannequin.setDir(SOUTH)
stamp = getFlatIcon(mannequin)
if(wide_icon)
stamp_x = -15
else
stamp_x = 1
CHECK_TICK
preview_icon.Blend(stamp, ICON_OVERLAY, stamp_x, stamp_y)
preview_icon.Blend(stamp, ICON_OVERLAY, 49, 1)
CHECK_TICK
preview_icon.Scale(preview_icon.Width() * 2, preview_icon.Height() * 2) // Scaling here to prevent blurring in the browser.
CHECK_TICK
+71 -26
View File
@@ -2,6 +2,9 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
var/list/image/ghost_images_full = list() //this is a list of full images of the ghosts themselves
var/list/image/ghost_images_default = list() //this is a list of the default (non-accessorized, non-dir) images of the ghosts themselves
var/list/image/ghost_images_simple = list() //this is a list of all ghost images as the simple white ghost
var/global/static/observer_default_invisibility = INVISIBILITY_OBSERVER
/mob/dead/observer
name = "ghost"
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
@@ -56,10 +59,12 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
// of the mob
var/deadchat_name
/mob/dead/observer/New(mob/body)
/mob/dead/observer/Initialize()
invisibility = observer_default_invisibility
verbs += /mob/dead/observer/proc/dead_tele
if(global.cross_allowed)
if(config.cross_allowed)
verbs += /mob/dead/observer/proc/server_hop
ghostimage = image(src.icon,src,src.icon_state)
@@ -74,9 +79,10 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
updateallghostimages()
var/turf/T
var/mob/body = loc
if(ismob(body))
T = get_turf(body) //Where is the body located?
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
logging = body.logging //preserve our logs by copying them to our ghost
gender = body.gender
if(body.mind && body.mind.name)
@@ -100,7 +106,12 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
update_icon()
if(!T)
T = pick(latejoin) //Safety in case we cannot find the body's position
var/list/turfs = get_area_turfs(/area/shuttle/arrival)
if(turfs.len)
T = pick(turfs)
else
T = locate(round(world.maxx/2), round(world.maxy/2), ZLEVEL_STATION) //middle of the station
loc = T
if(!name) //To prevent nameless ghosts
@@ -314,13 +325,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!client)
return
if(!(mind && mind.current))
src << "<span class='warning'>You have no body.</span>"
to_chat(src, "<span class='warning'>You have no body.</span>")
return
if(!can_reenter_corpse)
src << "<span class='warning'>You cannot re-enter your body.</span>"
to_chat(src, "<span class='warning'>You cannot re-enter your body.</span>")
return
if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients
usr << "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>"
to_chat(usr, "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>")
return
client.view = world.view
SStgui.on_transfer(src, mind.current) // Transfer NanoUIs.
@@ -331,7 +342,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(flashwindow)
window_flash(client)
if(message)
src << "<span class='ghostalert'>[message]</span>"
to_chat(src, "<span class='ghostalert'>[message]</span>")
if(source)
var/obj/screen/alert/A = throw_alert("\ref[source]_notify_cloning", /obj/screen/alert/notify_cloning)
if(A)
@@ -345,7 +356,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
A.add_overlay(source)
source.layer = old_layer
source.plane = old_plane
src << "<span class='ghostalert'><a href=?src=\ref[src];reenter=1>(Click to re-enter)</a></span>"
to_chat(src, "<span class='ghostalert'><a href=?src=\ref[src];reenter=1>(Click to re-enter)</a></span>")
if(sound)
src << sound(sound)
@@ -354,7 +365,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Teleport"
set desc= "Teleport to a location"
if(!isobserver(usr))
usr << "Not when you're not dead!"
to_chat(usr, "Not when you're not dead!")
return
var/A
A = input("Area to jump to", "BOOYEA", A) as null|anything in sortedAreas
@@ -367,7 +378,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
L+=T
if(!L || !L.len)
usr << "No area available."
to_chat(usr, "No area available.")
usr.loc = pick(L)
update_parallax_contents()
@@ -393,7 +404,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25)
if(orbiting && orbiting.orbiting != target)
src << "<span class='notice'>Now orbiting [target].</span>"
to_chat(src, "<span class='notice'>Now orbiting [target].</span>")
var/rot_seg
@@ -446,7 +457,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
A.loc = T
A.update_parallax_contents()
else
A << "This mob is not located in the game world."
to_chat(A, "This mob is not located in the game world.")
/mob/dead/observer/verb/change_view_range()
set category = "Ghost"
@@ -488,11 +499,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/memory()
set hidden = 1
src << "<span class='danger'>You are dead! You have no mind to store memory!</span>"
to_chat(src, "<span class='danger'>You are dead! You have no mind to store memory!</span>")
/mob/dead/observer/add_memory()
set hidden = 1
src << "<span class='danger'>You are dead! You have no mind to store memory!</span>"
to_chat(src, "<span class='danger'>You are dead! You have no mind to store memory!</span>")
/mob/dead/observer/verb/toggle_ghostsee()
set name = "Toggle Ghost Vision"
@@ -500,7 +511,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set category = "Ghost"
ghostvision = !(ghostvision)
updateghostsight()
usr << "You [(ghostvision?"now":"no longer")] have ghost vision."
to_chat(usr, "You [(ghostvision?"now":"no longer")] have ghost vision.")
/mob/dead/observer/verb/toggle_darkness()
set name = "Toggle Darkness"
@@ -581,14 +592,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return 0
if(ismegafauna(target))
src << "<span class='warning'>This creature is too powerful for you to possess!</span>"
to_chat(src, "<span class='warning'>This creature is too powerful for you to possess!</span>")
return 0
if(can_reenter_corpse || (mind && mind.current))
if(alert(src, "Your soul is still tied to your former life as [mind.current.name], if you go forward there is no going back to that life. Are you sure you wish to continue?", "Move On", "Yes", "No") == "No")
return 0
if(target.key)
src << "<span class='warning'>Someone has taken this body while you were choosing!</span>"
to_chat(src, "<span class='warning'>Someone has taken this body while you were choosing!</span>")
return 0
target.key = key
@@ -599,14 +610,32 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set category = "Ghost"
set name = "Server Hop!"
set desc= "Jump to the other server"
if (alert(src, "Jump to server running at [global.cross_address]?", "Server Hop", "Yes", "No") != "Yes")
if(notransform)
return
if(!config.cross_allowed)
verbs -= /mob/dead/observer/proc/server_hop
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
return
if (alert(src, "Jump to server running at [config.cross_address]?", "Server Hop", "Yes", "No") != "Yes")
return 0
if (client && global.cross_allowed)
src << "<span class='notice'>Sending you to [global.cross_address].</span>"
if (client && config.cross_allowed)
to_chat(src, "<span class='notice'>Sending you to [config.cross_address].</span>")
new /obj/screen/splash(client)
notransform = TRUE
sleep(29) //let the animation play
notransform = FALSE
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
client << link(global.cross_address)
client << link(config.cross_address + "?server_hop=[key]")
else
src << "<span class='error'>There is no other server configured!</span>"
to_chat(src, "<span class='error'>There is no other server configured!</span>")
/proc/show_server_hop_transfer_screen(expected_key)
//only show it to incoming ghosts
for(var/mob/dead/observer/O in player_list)
if(O.key == expected_key)
if(O.client)
new /obj/screen/splash(O.client, TRUE)
break
//this is a mob verb instead of atom for performance reasons
//see /mob/verb/examinate() in mob.dm for more info
@@ -643,8 +672,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/atom/movable/target = locate(href_list["follow"])
if(istype(target) && (target != src))
ManualFollow(target)
return
if(href_list["x"] && href_list["y"] && href_list["z"])
var/tx = text2num(href_list["x"])
var/ty = text2num(href_list["y"])
var/tz = text2num(href_list["z"])
var/turf/target = locate(tx, ty, tz)
if(istype(target))
forceMove(target)
return
if(href_list["reenter"])
reenter_corpse()
return
//We don't want to update the current var
//But we will still carry a mind.
@@ -668,11 +707,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(data_huds_on) //remove old huds
remove_data_huds()
src << "<span class='notice'>Data HUDs disabled.</span>"
to_chat(src, "<span class='notice'>Data HUDs disabled.</span>")
data_huds_on = 0
else
show_data_huds()
src << "<span class='notice'>Data HUDs enabled.</span>"
to_chat(src, "<span class='notice'>Data HUDs enabled.</span>")
data_huds_on = 1
/mob/dead/observer/verb/restore_ghost_apperance()
@@ -781,9 +820,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(SSpai)
SSpai.recruitWindow(src)
else
usr << "Can't become a pAI candidate while not dead!"
to_chat(usr, "Can't become a pAI candidate while not dead!")
/mob/dead/observer/CtrlShiftClick(mob/user)
if(isobserver(user) && check_rights(R_SPAWN))
change_mob_type( /mob/living/carbon/human , null, null, TRUE) //always delmob, ghosts shouldn't be left lingering
/proc/set_observer_default_invisibility(amount, message=null)
for(var/mob/dead/observer/G in player_list)
G.invisibility = amount
if(message)
to_chat(G, message)
observer_default_invisibility = amount
+1 -1
View File
@@ -18,5 +18,5 @@
else
speaker = V.source
var/link = FOLLOW_LINK(src, speaker)
src << "[link] [message]"
to_chat(src, "[link] [message]")
+6 -6
View File
@@ -178,7 +178,7 @@
if(T)
T.alternateProcessing = !T.alternateProcessing
T.forceProcess = 1
usr << "[T]'s processing has been switched to [T.alternateProcessing ? "High Profile" : "Low Profile"]"
to_chat(usr, "[T]'s processing has been switched to [T.alternateProcessing ? "High Profile" : "Low Profile"]")
/client/proc/customiseSNPC(var/mob/A in SSnpc.botPool_l)
set name = "Customize SNPC"
@@ -381,7 +381,7 @@
faction -= "neutral"
faction += "hostile"
/mob/living/carbon/human/interactive/New()
/mob/living/carbon/human/interactive/Initialize()
..()
set_species(/datum/species/synth)
@@ -1605,13 +1605,13 @@
nearby += M
//END OF MODULES
/mob/living/carbon/human/interactive/angry/New()
/mob/living/carbon/human/interactive/angry/Initialize()
TRAITS |= TRAIT_ROBUST
TRAITS |= TRAIT_MEAN
faction += "bot_angry"
..()
/mob/living/carbon/human/interactive/friendly/New()
/mob/living/carbon/human/interactive/friendly/Initialize()
TRAITS |= TRAIT_FRIENDLY
TRAITS |= TRAIT_UNROBUST
faction += "bot_friendly"
@@ -1619,7 +1619,7 @@
functions -= "combat"
..()
/mob/living/carbon/human/interactive/greytide/New()
/mob/living/carbon/human/interactive/greytide/Initialize()
TRAITS |= TRAIT_ROBUST
TRAITS |= TRAIT_MEAN
TRAITS |= TRAIT_THIEVING
@@ -1631,7 +1631,7 @@
..()
//Walk softly and carry a big stick
/mob/living/carbon/human/interactive/robust/New()
/mob/living/carbon/human/interactive/robust/Initialize()
TRAITS |= TRAIT_FRIENDLY
TRAITS |= TRAIT_ROBUST
TRAITS |= TRAIT_SMART
+2 -2
View File
@@ -350,7 +350,7 @@
/obj/item/proc/equip_to_best_slot(var/mob/M)
if(src != M.get_active_held_item())
M << "<span class='warning'>You are not holding anything to equip!</span>"
to_chat(M, "<span class='warning'>You are not holding anything to equip!</span>")
return FALSE
if(M.equip_to_appropriate_slot(src))
@@ -380,7 +380,7 @@
S.handle_item_insertion(src)
return TRUE
M << "<span class='warning'>You are unable to equip that!</span>"
to_chat(M, "<span class='warning'>You are unable to equip that!</span>")
return FALSE
+4 -4
View File
@@ -12,7 +12,7 @@
/mob/living/carbon/human/proc/resume_bleeding()
bleedsuppress = 0
if(stat != DEAD && bleed_rate)
src << "<span class='warning'>The blood soaks through your bandage.</span>"
to_chat(src, "<span class='warning'>The blood soaks through your bandage.</span>")
/mob/living/carbon/monkey/handle_blood()
@@ -38,20 +38,20 @@
switch(blood_volume)
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
if(prob(5))
src << "<span class='warning'>You feel [pick("dizzy","woozy","faint")].</span>"
to_chat(src, "<span class='warning'>You feel [pick("dizzy","woozy","faint")].</span>")
adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1))
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1))
if(prob(5))
blur_eyes(6)
var/word = pick("dizzy","woozy","faint")
src << "<span class='warning'>You feel very [word].</span>"
to_chat(src, "<span class='warning'>You feel very [word].</span>")
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
adjustOxyLoss(5)
if(prob(15))
Paralyse(rand(1,3))
var/word = pick("dizzy","woozy","faint")
src << "<span class='warning'>You feel extremely [word].</span>"
to_chat(src, "<span class='warning'>You feel extremely [word].</span>")
if(0 to BLOOD_VOLUME_SURVIVE)
death()
+6 -6
View File
@@ -28,7 +28,7 @@
//TODO make it toggleable to either forcedrop the items, or deny
//entry when holding them
// literally only an option for carbons though
C << "<span class='warning'>You may not hold items while blood crawling!</span>"
to_chat(C, "<span class='warning'>You may not hold items while blood crawling!</span>")
return 0
var/obj/item/weapon/bloodcrawl/B1 = new(C)
var/obj/item/weapon/bloodcrawl/B2 = new(C)
@@ -84,11 +84,11 @@
if(kidnapped)
var/success = bloodcrawl_consume(victim)
if(!success)
src << "<span class='danger'>You happily devour... nothing? Your meal vanished at some point!</span>"
to_chat(src, "<span class='danger'>You happily devour... nothing? Your meal vanished at some point!</span>")
return 1
/mob/living/proc/bloodcrawl_consume(mob/living/victim)
src << "<span class='danger'>You begin to feast on [victim]. You can not move while you are doing this.</span>"
to_chat(src, "<span class='danger'>You begin to feast on [victim]. You can not move while you are doing this.</span>")
var/sound
if(istype(src, /mob/living/simple_animal/slaughter))
@@ -105,7 +105,7 @@
return FALSE
if(victim.reagents && victim.reagents.has_reagent("devilskiss"))
src << "<span class='warning'><b>AAH! THEIR FLESH! IT BURNS!</b></span>"
to_chat(src, "<span class='warning'><b>AAH! THEIR FLESH! IT BURNS!</b></span>")
adjustBruteLoss(25) //I can't use adjustHealth() here because bloodcrawl affects /mob/living and adjustHealth() only affects simple mobs
var/found_bloodpool = FALSE
for(var/obj/effect/decal/cleanable/target in range(1,get_turf(victim)))
@@ -122,7 +122,7 @@
victim.exit_blood_effect()
return TRUE
src << "<span class='danger'>You devour [victim]. Your health is fully restored.</span>"
to_chat(src, "<span class='danger'>You devour [victim]. Your health is fully restored.</span>")
src.revive(full_heal = 1)
// No defib possible after laughter
@@ -153,7 +153,7 @@
/mob/living/proc/phasein(obj/effect/decal/cleanable/B)
if(src.notransform)
src << "<span class='warning'>Finish eating first!</span>"
to_chat(src, "<span class='warning'>Finish eating first!</span>")
return 0
B.visible_message("<span class='warning'>[B] starts to bubble...</span>")
if(!do_after(src, 20, target = B))
+10 -10
View File
@@ -47,10 +47,10 @@
if(istype(O,/obj/item/organ/brain)) //Time to stick a brain in it --NEO
var/obj/item/organ/brain/newbrain = O
if(brain)
user << "<span class='warning'>There's already a brain in the MMI!</span>"
to_chat(user, "<span class='warning'>There's already a brain in the MMI!</span>")
return
if(!newbrain.brainmob)
user << "<span class='warning'>You aren't sure where this brain came from, but you're pretty sure it's a useless brain!</span>"
to_chat(user, "<span class='warning'>You aren't sure where this brain came from, but you're pretty sure it's a useless brain!</span>")
return
if(!user.transferItemToLoc(O, src))
@@ -86,9 +86,9 @@
/obj/item/device/mmi/attack_self(mob/user)
if(!brain)
radio.on = !radio.on
user << "<span class='notice'>You toggle the MMI's radio system [radio.on==1 ? "on" : "off"].</span>"
to_chat(user, "<span class='notice'>You toggle the MMI's radio system [radio.on==1 ? "on" : "off"].</span>")
else
user << "<span class='notice'>You unlock and upend the MMI, spilling the brain onto the floor.</span>"
to_chat(user, "<span class='notice'>You unlock and upend the MMI, spilling the brain onto the floor.</span>")
eject_brain(user)
update_icon()
name = "Man-Machine Interface"
@@ -146,13 +146,13 @@
set popup_menu = 0
if(brainmob.stat)
brainmob << "<span class='warning'>Can't do that while incapacitated or dead!</span>"
to_chat(brainmob, "<span class='warning'>Can't do that while incapacitated or dead!</span>")
if(!radio.on)
brainmob << "<span class='warning'>Your radio is disabled!</span>"
to_chat(brainmob, "<span class='warning'>Your radio is disabled!</span>")
return
radio.listening = radio.listening==1 ? 0 : 1
brainmob << "<span class='notice'>Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast.</span>"
to_chat(brainmob, "<span class='notice'>Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast.</span>")
/obj/item/device/mmi/emp_act(severity)
if(!brainmob || iscyborg(loc))
@@ -195,13 +195,13 @@
if(brainmob)
var/mob/living/brain/B = brainmob
if(!B.key || !B.mind || B.stat == DEAD)
user << "<span class='warning'>The MMI indicates the brain is completely unresponsive.</span>"
to_chat(user, "<span class='warning'>The MMI indicates the brain is completely unresponsive.</span>")
else if(!B.client)
user << "<span class='warning'>The MMI indicates the brain is currently inactive; it might change.</span>"
to_chat(user, "<span class='warning'>The MMI indicates the brain is currently inactive; it might change.</span>")
else
user << "<span class='notice'>The MMI indicates the brain is active.</span>"
to_chat(user, "<span class='notice'>The MMI indicates the brain is active.</span>")
/obj/item/device/mmi/syndie
+3 -3
View File
@@ -8,15 +8,15 @@
var/emp_damage = 0//Handles a type of MMI damage
var/datum/dna/stored/stored_dna // dna var for brain. Used to store dna, brain dna is not considered like actual dna, brain.has_dna() returns FALSE.
stat = DEAD //we start dead by default
see_invisible = SEE_INVISIBLE_MINIMUM
see_invisible = SEE_INVISIBLE_LIVING
/mob/living/brain/New(loc)
/mob/living/brain/Initialize()
..()
create_dna(src)
stored_dna.initialize_dna(random_blood_type())
if(isturf(loc)) //not spawned in an MMI or brain organ (most likely adminspawned)
var/obj/item/organ/brain/OB = new(loc) //we create a new brain organ for it.
src.loc = OB
loc = OB
OB.brainmob = src
+10 -10
View File
@@ -56,7 +56,7 @@
C.dna.copy_dna(brainmob.stored_dna)
if(L.mind && L.mind.current && (L.mind.current.stat == DEAD))
L.mind.transfer_to(brainmob)
brainmob << "<span class='notice'>You feel slightly disoriented. That's normal when you're just a brain.</span>"
to_chat(brainmob, "<span class='notice'>You feel slightly disoriented. That's normal when you're just a brain.</span>")
/obj/item/organ/brain/attackby(obj/item/O, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
@@ -69,16 +69,16 @@
if(brainmob)
if(brainmob.client)
if(brainmob.health <= HEALTH_THRESHOLD_DEAD)
user << "It's lifeless and severely damaged."
to_chat(user, "It's lifeless and severely damaged.")
else
user << "You can feel the small spark of life still left in this one."
to_chat(user, "You can feel the small spark of life still left in this one.")
else
user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later."
to_chat(user, "This one seems particularly lifeless. Perhaps it will regain some of its luster later.")
else
if(decoy_override)
user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later."
to_chat(user, "This one seems particularly lifeless. Perhaps it will regain some of its luster later.")
else
user << "This one is completely devoid of life."
to_chat(user, "This one is completely devoid of life.")
/obj/item/organ/brain/attack(mob/living/carbon/C, mob/user)
if(!istype(C))
@@ -90,7 +90,7 @@
return ..()
if((C.head && (C.head.flags_cover & HEADCOVERSEYES)) || (C.wear_mask && (C.wear_mask.flags_cover & MASKCOVERSEYES)) || (C.glasses && (C.glasses.flags & GLASSESCOVERSEYES)))
user << "<span class='warning'>You're going to need to remove their head cover first!</span>"
to_chat(user, "<span class='warning'>You're going to need to remove their head cover first!</span>")
return
//since these people will be dead M != usr
@@ -107,10 +107,10 @@
"<span class='userdanger'>[msg]</span>")
if(C != user)
C << "<span class='notice'>[user] inserts [src] into your head.</span>"
user << "<span class='notice'>You insert [src] into [C]'s head.</span>"
to_chat(C, "<span class='notice'>[user] inserts [src] into your head.</span>")
to_chat(user, "<span class='notice'>You insert [src] into [C]'s head.</span>")
else
user << "<span class='notice'>You insert [src] into your head.</span>" //LOL
to_chat(user, "<span class='notice'>You insert [src] into your head.</span>" )
Insert(C)
else
+4 -4
View File
@@ -48,7 +48,7 @@ var/global/posibrain_notif_cooldown = 0
/obj/item/device/mmi/posibrain/attack_self(mob/user)
if(brainmob && !brainmob.key && !notified)
//Start the process of requesting a new ghost.
user << begin_activation_message
to_chat(user, begin_activation_message)
ping_ghosts("requested", FALSE)
notified = 1
used = 0
@@ -98,7 +98,7 @@ var/global/posibrain_notif_cooldown = 0
/obj/item/device/mmi/posibrain/proc/transfer_personality(mob/candidate)
if(used || (brainmob && brainmob.key)) //Prevents hostile takeover if two ghosts get the prompt or link for the same brain.
candidate << "This brain has already been taken! Please try your possession again later!"
to_chat(candidate, "This brain has already been taken! Please try your possession again later!")
return FALSE
notified = 0
if(candidate.mind && !isobserver(candidate))
@@ -106,7 +106,7 @@ var/global/posibrain_notif_cooldown = 0
else
brainmob.ckey = candidate.ckey
name = "[initial(name)] ([brainmob.name])"
brainmob << welcome_message
to_chat(brainmob, welcome_message)
brainmob.mind.assigned_role = new_role
brainmob.stat = CONSCIOUS
dead_mob_list -= brainmob
@@ -131,7 +131,7 @@ var/global/posibrain_notif_cooldown = 0
else
msg = "[dead_message]"
user << msg
to_chat(user, msg)
/obj/item/device/mmi/posibrain/New()
brainmob = new(src)
@@ -34,7 +34,7 @@
var/static/regex/alien_name_regex = new("alien (larva|sentinel|drone|hunter|praetorian|queen)( \\(\\d+\\))?")
/mob/living/carbon/alien/New()
/mob/living/carbon/alien/Initialize()
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
@@ -138,7 +138,7 @@ Des: Removes all infected images from the alien.
return initial(pixel_y)
/mob/living/carbon/alien/proc/alien_evolve(mob/living/carbon/alien/new_xeno)
src << "<span class='noticealien'>You begin to evolve!</span>"
to_chat(src, "<span class='noticealien'>You begin to evolve!</span>")
visible_message("<span class='alertalien'>[src] begins to twist and contort!</span>")
new_xeno.setDir(dir)
if(!alien_name_regex.Find(name))
@@ -15,7 +15,7 @@ In all, this is a lot like the monkey code. /N
*/
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M)
if(isturf(loc) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
to_chat(M, "No attacking people at spawn, you jackass.")
return
switch(M.a_intent)
@@ -41,7 +41,7 @@ In all, this is a lot like the monkey code. /N
add_logs(M, src, "attacked")
updatehealth()
else
M << "<span class='warning'>[name] is too injured for that.</span>"
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L)
@@ -1,18 +1,10 @@
/mob/living/carbon/alien/getToxLoss()
return 0
/mob/living/carbon/alien/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE) //alien immune to tox damage
return FALSE
/mob/living/carbon/alien/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE) // Weak to Fire
if(amount > 0)
amount *= 2
. = ..()
//aliens are immune to stamina damage.
/mob/living/carbon/alien/adjustStaminaLoss(amount, updating_stamina = 1)
return
@@ -42,15 +42,15 @@ Doesn't work on other aliens/AI.*/
/obj/effect/proc_holder/alien/proc/cost_check(check_turf=0,mob/living/carbon/user,silent = 0)
if(user.stat)
if(!silent)
user << "<span class='noticealien'>You must be conscious to do this.</span>"
to_chat(user, "<span class='noticealien'>You must be conscious to do this.</span>")
return 0
if(user.getPlasma() < plasma_cost)
if(!silent)
user << "<span class='noticealien'>Not enough plasma stored.</span>"
to_chat(user, "<span class='noticealien'>Not enough plasma stored.</span>")
return 0
if(check_turf && (!isturf(user.loc) || isspaceturf(user.loc)))
if(!silent)
user << "<span class='noticealien'>Bad place for a garden!</span>"
to_chat(user, "<span class='noticealien'>Bad place for a garden!</span>")
return 0
return 1
@@ -63,7 +63,7 @@ Doesn't work on other aliens/AI.*/
/obj/effect/proc_holder/alien/plant/fire(mob/living/carbon/user)
if(locate(/obj/structure/alien/weeds/node) in get_turf(user))
user << "There's already a weed node here."
to_chat(user, "There's already a weed node here.")
return 0
user.visible_message("<span class='alertalien'>[user] has planted some alien weeds!</span>")
new/obj/structure/alien/weeds/node(user.loc)
@@ -85,19 +85,14 @@ Doesn't work on other aliens/AI.*/
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
if(msg)
log_say("AlienWhisper: [key_name(user)]->[M.key] : [msg]")
M << "<span class='noticealien'>You hear a strange, alien voice in your head...</span>[msg]"
user << "<span class='noticealien'>You said: \"[msg]\" to [M]</span>"
to_chat(M, "<span class='noticealien'>You hear a strange, alien voice in your head...</span>[msg]")
to_chat(user, "<span class='noticealien'>You said: \"[msg]\" to [M]</span>")
for(var/ded in dead_mob_list)
if(!isobserver(ded))
continue
var/follow_link_user = FOLLOW_LINK(ded, user)
var/follow_link_whispee = FOLLOW_LINK(ded, M)
ded << "[follow_link_user] \
<span class='name'>[user]</span> \
<span class='alertalien'>Alien Whisper --> </span> \
[follow_link_whispee] \
<span class='name'>[M]</span> \
<span class='noticealien'>[msg]</span>"
to_chat(ded, "[follow_link_user] <span class='name'>[user]</span> <span class='alertalien'>Alien Whisper --> </span> [follow_link_whispee] <span class='name'>[M]</span> <span class='noticealien'>[msg]</span>")
else
return 0
return 1
@@ -122,10 +117,10 @@ Doesn't work on other aliens/AI.*/
if (get_dist(user,M) <= 1)
M.adjustPlasma(amount)
user.adjustPlasma(-amount)
M << "<span class='noticealien'>[user] has transferred [amount] plasma to you.</span>"
user << "<span class='noticealien'>You transfer [amount] plasma to [M]</span>"
to_chat(M, "<span class='noticealien'>[user] has transferred [amount] plasma to you.</span>")
to_chat(user, "<span class='noticealien'>You transfer [amount] plasma to [M]</span>")
else
user << "<span class='noticealien'>You need to be closer!</span>"
to_chat(user, "<span class='noticealien'>You need to be closer!</span>")
return
/obj/effect/proc_holder/alien/acid
@@ -146,12 +141,12 @@ Doesn't work on other aliens/AI.*/
user.visible_message("<span class='alertalien'>[user] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid!</span>")
return 1
else
user << "<span class='noticealien'>You cannot dissolve this object.</span>"
to_chat(user, "<span class='noticealien'>You cannot dissolve this object.</span>")
return 0
else
src << "<span class='noticealien'>Target is too far away.</span>"
to_chat(src, "<span class='noticealien'>Target is too far away.</span>")
return 0
@@ -204,7 +199,7 @@ Doesn't work on other aliens/AI.*/
var/mob/living/carbon/user = ranged_ability_user
if(user.getPlasma() < p_cost)
user << "<span class='warning'>You need at least [p_cost] plasma to spit.</span>"
to_chat(user, "<span class='warning'>You need at least [p_cost] plasma to spit.</span>")
remove_ranged_ability()
return
@@ -255,14 +250,14 @@ Doesn't work on other aliens/AI.*/
/obj/effect/proc_holder/alien/resin/fire(mob/living/carbon/user)
if(locate(/obj/structure/alien/resin) in user.loc)
user << "<span class='danger'>There is already a resin structure there.</span>"
to_chat(user, "<span class='danger'>There is already a resin structure there.</span>")
return 0
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in structures
if(!choice)
return 0
if (!cost_check(check_turf,user))
return 0
user << "<span class='notice'>You shape a [choice].</span>"
to_chat(user, "<span class='notice'>You shape a [choice].</span>")
user.visible_message("<span class='notice'>[user] vomits up a thick purple substance and begins to shape it.</span>")
choice = structures[choice]
@@ -298,12 +293,12 @@ Doesn't work on other aliens/AI.*/
user.alpha = 75 //Still easy to see in lit areas with bright tiles, almost invisible on resin.
user.sneaking = 1
active = 1
user << "<span class='noticealien'>You blend into the shadows...</span>"
to_chat(user, "<span class='noticealien'>You blend into the shadows...</span>")
else
user.alpha = initial(user.alpha)
user.sneaking = 0
active = 0
user << "<span class='noticealien'>You reveal yourself!</span>"
to_chat(user, "<span class='noticealien'>You reveal yourself!</span>")
/mob/living/carbon/proc/getPlasma()
@@ -6,7 +6,7 @@
icon_state = "aliend"
/mob/living/carbon/alien/humanoid/drone/New()
/mob/living/carbon/alien/humanoid/drone/Initialize()
AddAbility(new/obj/effect/proc_holder/alien/evolve(null))
..()
@@ -30,19 +30,19 @@
/obj/effect/proc_holder/alien/evolve/fire(mob/living/carbon/alien/humanoid/user)
var/obj/item/organ/alien/hivenode/node = user.getorgan(/obj/item/organ/alien/hivenode)
if(!node) //Players are Murphy's Law. We may not expect there to ever be a living xeno with no hivenode, but they _WILL_ make it happen.
user << "<span class='danger'>Without the hivemind, you can't possibly hold the responsibility of leadership!</span>"
to_chat(user, "<span class='danger'>Without the hivemind, you can't possibly hold the responsibility of leadership!</span>")
return 0
if(node.recent_queen_death)
user << "<span class='danger'>Your thoughts are still too scattered to take up the position of leadership.</span>"
to_chat(user, "<span class='danger'>Your thoughts are still too scattered to take up the position of leadership.</span>")
return 0
if(!isturf(user.loc))
user << "<span class='notice'>You can't evolve here!</span>"
to_chat(user, "<span class='notice'>You can't evolve here!</span>")
return 0
if(!get_alien_type(/mob/living/carbon/alien/humanoid/royal))
var/mob/living/carbon/alien/humanoid/royal/praetorian/new_xeno = new (user.loc)
user.alien_evolve(new_xeno)
return 1
else
user << "<span class='notice'>We already have a living royal!</span>"
to_chat(user, "<span class='notice'>We already have a living royal!</span>")
return 0
@@ -22,7 +22,7 @@
leap_icon.icon_state = "leap_[leap_on_click ? "on":"off"]"
update_icons()
if(message)
src << "<span class='noticealien'>You will now [leap_on_click ? "leap at":"slash at"] enemies!</span>"
to_chat(src, "<span class='noticealien'>You will now [leap_on_click ? "leap at":"slash at"] enemies!</span>")
else
return
@@ -39,14 +39,14 @@
/mob/living/carbon/alien/humanoid/hunter/proc/leap_at(atom/A)
if(pounce_cooldown)
src << "<span class='alertalien'>You are too fatigued to pounce right now!</span>"
to_chat(src, "<span class='alertalien'>You are too fatigued to pounce right now!</span>")
return
if(leaping || stat || buckled || lying)
return
if(!has_gravity() || !A.has_gravity())
src << "<span class='alertalien'>It is unsafe to leap without gravity!</span>"
to_chat(src, "<span class='alertalien'>It is unsafe to leap without gravity!</span>")
//It's also extremely buggy visually, so it's balance+bugfix
return
@@ -7,7 +7,7 @@
/mob/living/carbon/alien/humanoid/royal/praetorian/New()
/mob/living/carbon/alien/humanoid/royal/praetorian/Initialize()
real_name = name
@@ -37,10 +37,10 @@
/obj/effect/proc_holder/alien/royal/praetorian/evolve/fire(mob/living/carbon/alien/humanoid/user)
var/obj/item/organ/alien/hivenode/node = user.getorgan(/obj/item/organ/alien/hivenode)
if(!node) //Just in case this particular Praetorian gets violated and kept by the RD as a replacement for Lamarr.
user << "<span class='danger'>Without the hivemind, you would be unfit to rule as queen!</span>"
to_chat(user, "<span class='danger'>Without the hivemind, you would be unfit to rule as queen!</span>")
return 0
if(node.recent_queen_death)
user << "<span class='danger'>You are still too burdened with guilt to evolve into a queen.</span>"
to_chat(user, "<span class='danger'>You are still too burdened with guilt to evolve into a queen.</span>")
return 0
if(!get_alien_type(/mob/living/carbon/alien/humanoid/royal/queen))
var/mob/living/carbon/alien/humanoid/royal/queen/new_xeno = new (user.loc)
@@ -50,5 +50,5 @@
M.Grant(new_xeno)
return 1
else
user << "<span class='notice'>We already have an alive queen.</span>"
to_chat(user, "<span class='notice'>We already have an alive queen.</span>")
return 0
@@ -6,7 +6,7 @@
icon_state = "aliens"
/mob/living/carbon/alien/humanoid/sentinel/New()
/mob/living/carbon/alien/humanoid/sentinel/Initialize()
AddAbility(new /obj/effect/proc_holder/alien/sneak)
..()
@@ -21,7 +21,7 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/humanoid/New()
/mob/living/carbon/alien/humanoid/Initialize()
AddAbility(new/obj/effect/proc_holder/alien/regurgitate(null))
..()
@@ -33,7 +33,7 @@
/datum/action/small_sprite/Trigger()
..()
if(!small)
var/image/I = image(icon = 'icons/mob/alien.dmi' , icon_state = "alienq_running", loc = owner)
var/image/I = image(icon = 'icons/mob/alien.dmi' , icon_state = "alienq", loc = owner)
I.override = 1
I.pixel_x -= owner.pixel_x
I.pixel_y -= owner.pixel_y
@@ -44,7 +44,7 @@
owner.remove_alt_appearance("smallqueen")
small = 0
/mob/living/carbon/alien/humanoid/royal/queen/New()
/mob/living/carbon/alien/humanoid/royal/queen/Initialize()
//there should only be one queen
for(var/mob/living/carbon/alien/humanoid/royal/queen/Q in living_mob_list)
if(Q == src)
@@ -84,7 +84,7 @@
/obj/effect/proc_holder/alien/lay_egg/fire(mob/living/carbon/user)
if(locate(/obj/structure/alien/egg) in get_turf(user))
user << "There's already an egg here."
to_chat(user, "There's already an egg here.")
return 0
user.visible_message("<span class='alertalien'>[user] has laid an egg!</span>")
new /obj/structure/alien/egg(user.loc)
@@ -103,20 +103,20 @@
/obj/effect/proc_holder/alien/royal/queen/promote/fire(mob/living/carbon/alien/user)
var/obj/item/queenpromote/prom
if(get_alien_type(/mob/living/carbon/alien/humanoid/royal/praetorian/))
user << "<span class='noticealien'>You already have a Praetorian!</span>"
to_chat(user, "<span class='noticealien'>You already have a Praetorian!</span>")
return 0
else
for(prom in user)
user << "<span class='noticealien'>You discard [prom].</span>"
to_chat(user, "<span class='noticealien'>You discard [prom].</span>")
qdel(prom)
return 0
prom = new (user.loc)
if(!user.put_in_active_hand(prom, 1))
user << "<span class='warning'>You must empty your hands before preparing the parasite.</span>"
to_chat(user, "<span class='warning'>You must empty your hands before preparing the parasite.</span>")
return 0
else //Just in case telling the player only once is not enough!
user << "<span class='noticealien'>Use the royal parasite on one of your children to promote her to Praetorian!</span>"
to_chat(user, "<span class='noticealien'>Use the royal parasite on one of your children to promote her to Praetorian!</span>")
return 0
/obj/item/queenpromote
@@ -128,19 +128,19 @@
/obj/item/queenpromote/attack(mob/living/M, mob/living/carbon/alien/humanoid/user)
if(!isalienadult(M) || istype(M, /mob/living/carbon/alien/humanoid/royal))
user << "<span class='noticealien'>You may only use this with your adult, non-royal children!</span>"
to_chat(user, "<span class='noticealien'>You may only use this with your adult, non-royal children!</span>")
return
if(get_alien_type(/mob/living/carbon/alien/humanoid/royal/praetorian/))
user << "<span class='noticealien'>You already have a Praetorian!</span>"
to_chat(user, "<span class='noticealien'>You already have a Praetorian!</span>")
return
var/mob/living/carbon/alien/humanoid/A = M
if(A.stat == CONSCIOUS && A.mind && A.key)
if(!user.usePlasma(500))
user << "<span class='noticealien'>You must have 500 plasma stored to use this!</span>"
to_chat(user, "<span class='noticealien'>You must have 500 plasma stored to use this!</span>")
return
A << "<span class='noticealien'>The queen has granted you a promotion to Praetorian!</span>"
to_chat(A, "<span class='noticealien'>The queen has granted you a promotion to Praetorian!</span>")
user.visible_message("<span class='alertalien'>[A] begins to expand, twist and contort!</span>")
var/mob/living/carbon/alien/humanoid/royal/praetorian/new_prae = new (A.loc)
A.mind.transfer_to(new_prae)
@@ -148,10 +148,10 @@
qdel(src)
return
else
user << "<span class='warning'>This child must be alert and responsive to become a Praetorian!</span>"
to_chat(user, "<span class='warning'>This child must be alert and responsive to become a Praetorian!</span>")
/obj/item/queenpromote/attack_self(mob/user)
user << "<span class='noticealien'>You discard [src].</span>"
to_chat(user, "<span class='noticealien'>You discard [src].</span>")
qdel(src)
//:^)
@@ -18,7 +18,7 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/larva/New()
/mob/living/carbon/alien/larva/Initialize()
AddAbility(new/obj/effect/proc_holder/alien/hide(null))
AddAbility(new/obj/effect/proc_holder/alien/larva_evolve(null))
@@ -60,9 +60,9 @@
return
/mob/living/carbon/alien/larva/stripPanelUnequip(obj/item/what, mob/who)
src << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
/mob/living/carbon/alien/larva/stripPanelEquip(obj/item/what, mob/who)
src << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
@@ -33,14 +33,14 @@
var/mob/living/carbon/alien/larva/L = user
if(L.handcuffed || L.legcuffed) // Cuffing larvas ? Eh ?
user << "<span class='danger'>You cannot evolve when you are cuffed.</span>"
to_chat(user, "<span class='danger'>You cannot evolve when you are cuffed.</span>")
if(L.amount_grown >= L.max_grown) //TODO ~Carn
L << "<span class='name'>You are growing into a beautiful alien! It is time to choose a caste.</span>"
L << "<span class='info'>There are three to choose from:"
L << "<span class='name'>Hunters</span> <span class='info'>are the most agile caste, tasked with hunting for hosts. They are faster than a human and can even pounce, but are not much tougher than a drone.</span>"
L << "<span class='name'>Sentinels</span> <span class='info'>are tasked with protecting the hive. With their ranged spit, invisibility, and high health, they make formidable guardians and acceptable secondhand hunters.</span>"
L << "<span class='name'>Drones</span> <span class='info'>are the weakest and slowest of the castes, but can grow into a praetorian and then queen if no queen exists, and are vital to maintaining a hive with their resin secretion abilities.</span>"
to_chat(L, "<span class='name'>You are growing into a beautiful alien! It is time to choose a caste.</span>")
to_chat(L, "<span class='info'>There are three to choose from:")
to_chat(L, "<span class='name'>Hunters</span> <span class='info'>are the most agile caste, tasked with hunting for hosts. They are faster than a human and can even pounce, but are not much tougher than a drone.</span>")
to_chat(L, "<span class='name'>Sentinels</span> <span class='info'>are tasked with protecting the hive. With their ranged spit, invisibility, and high health, they make formidable guardians and acceptable secondhand hunters.</span>")
to_chat(L, "<span class='name'>Drones</span> <span class='info'>are the weakest and slowest of the castes, but can grow into a praetorian and then queen if no queen exists, and are vital to maintaining a hive with their resin secretion abilities.</span>")
var/alien_caste = alert(L, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
if(user.incapacitated()) //something happened to us while we were choosing.
@@ -58,5 +58,5 @@
L.alien_evolve(new_xeno)
return 0
else
user << "<span class='danger'>You are not fully grown.</span>"
to_chat(user, "<span class='danger'>You are not fully grown.</span>")
return 0
@@ -124,13 +124,13 @@
if(!owner|| owner.stat == DEAD)
return
if(isalien(owner)) //Different effects for aliens than humans
owner << "<span class='userdanger'>Your Queen has been struck down!</span>"
owner << "<span class='danger'>You are struck with overwhelming agony! You feel confused, and your connection to the hivemind is severed."
to_chat(owner, "<span class='userdanger'>Your Queen has been struck down!</span>")
to_chat(owner, "<span class='danger'>You are struck with overwhelming agony! You feel confused, and your connection to the hivemind is severed.")
owner.emote("roar")
owner.Stun(10) //Actually just slows them down a bit.
else if(ishuman(owner)) //Humans, being more fragile, are more overwhelmed by the mental backlash.
owner << "<span class='danger'>You feel a splitting pain in your head, and are struck with a wave of nausea. You cannot hear the hivemind anymore!"
to_chat(owner, "<span class='danger'>You feel a splitting pain in your head, and are struck with a wave of nausea. You cannot hear the hivemind anymore!")
owner.emote("scream")
owner.Weaken(5)
@@ -146,7 +146,7 @@
recent_queen_death = 0
if(!owner) //In case the xeno is butchered or subjected to surgery after death.
return
owner << "<span class='noticealien'>The pain of the queen's death is easing. You begin to hear the hivemind again.</span>"
to_chat(owner, "<span class='noticealien'>The pain of the queen's death is easing. You begin to hear the hivemind again.</span>")
owner.clear_alert("alien_noqueen")
+2 -2
View File
@@ -7,10 +7,10 @@
var/rendered = "<i><span class='alien'>Hivemind, <span class='name'>[shown_name]</span> <span class='message'>[message_a]</span></span></i>"
for(var/mob/S in player_list)
if(!S.stat && S.hivecheck())
S << rendered
to_chat(S, rendered)
if(S in dead_mob_list)
var/link = FOLLOW_LINK(S, src)
S << "[link] [rendered]"
to_chat(S, "[link] [rendered]")
/mob/living/carbon/alien/humanoid/royal/queen/alien_talk(message, shown_name = name)
shown_name = "<FONT size = 3>[shown_name]</FONT>"
@@ -1,19 +1,18 @@
// This is to replace the previous datum/disease/alien_embryo for slightly improved handling and maintainability
// It functions almost identically (see code/datums/diseases/alien_embryo.dm)
var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
/obj/item/organ/body_egg/alien_embryo
name = "alien embryo"
icon = 'icons/mob/alien.dmi'
icon_state = "larva0_dead"
var/stage = 0
var/bursting = FALSE
/obj/item/organ/body_egg/alien_embryo/on_find(mob/living/finder)
..()
if(stage < 4)
finder << "It's small and weak, barely the size of a foetus."
to_chat(finder, "It's small and weak, barely the size of a foetus.")
else
finder << "It's grown quite large, and writhes slightly as you look at it."
to_chat(finder, "It's grown quite large, and writhes slightly as you look at it.")
if(prob(10))
AttemptGrow(0)
@@ -30,31 +29,30 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
if(prob(2))
owner.emote("cough")
if(prob(2))
owner << "<span class='danger'>Your throat feels sore.</span>"
to_chat(owner, "<span class='danger'>Your throat feels sore.</span>")
if(prob(2))
owner << "<span class='danger'>Mucous runs down the back of your throat.</span>"
to_chat(owner, "<span class='danger'>Mucous runs down the back of your throat.</span>")
if(4)
if(prob(2))
owner.emote("sneeze")
if(prob(2))
owner.emote("cough")
if(prob(4))
owner << "<span class='danger'>Your muscles ache.</span>"
to_chat(owner, "<span class='danger'>Your muscles ache.</span>")
if(prob(20))
owner.take_bodypart_damage(1)
if(prob(4))
owner << "<span class='danger'>Your stomach hurts.</span>"
to_chat(owner, "<span class='danger'>Your stomach hurts.</span>")
if(prob(20))
owner.adjustToxLoss(1)
if(5)
owner << "<span class='danger'>You feel something tearing its way out of your stomach...</span>"
to_chat(owner, "<span class='danger'>You feel something tearing its way out of your stomach...</span>")
owner.adjustToxLoss(10)
/obj/item/organ/body_egg/alien_embryo/egg_process()
if(stage < 5 && prob(3))
stage++
spawn(0)
RefreshInfectionImage()
INVOKE_ASYNC(src, .proc/RefreshInfectionImage)
if(stage == 5 && prob(50))
for(var/datum/surgery/S in owner.surgeries)
@@ -65,45 +63,53 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
/obj/item/organ/body_egg/alien_embryo/proc/AttemptGrow(gib_on_success = 1)
if(!owner) return
var/list/candidates = get_candidates(ROLE_ALIEN, ALIEN_AFK_BRACKET, "alien candidate")
var/client/C = null
// To stop clientless larva, we will check that our host has a client
// if we find no ghosts to become the alien. If the host has a client
// he will become the alien but if he doesn't then we will set the stage
// to 4, so we don't do a process heavy check everytime.
if(candidates.len)
C = pick(candidates)
else if(owner.client && !(jobban_isbanned(owner, "alien candidate") || jobban_isbanned(owner, "Syndicate")))
C = owner.client
else
stage = 4 // Let's try again later.
/obj/item/organ/body_egg/alien_embryo/proc/AttemptGrow(gib_on_success=TRUE)
if(!owner || bursting)
return
bursting = TRUE
var/list/candidates = pollCandidates("Do you want to play as an alien larva that will burst out of [owner]?", ROLE_ALIEN, null, ROLE_ALIEN, 100, POLL_IGNORE_ALIEN_LARVA)
if(QDELETED(src) || QDELETED(owner))
return
if(!candidates.len || !owner)
bursting = FALSE
stage = 4
return
var/mob/dead/observer/ghost = pick(candidates)
var/overlay = image('icons/mob/alien.dmi', loc = owner, icon_state = "burst_lie")
owner.add_overlay(overlay)
var/atom/xeno_loc = get_turf(owner)
var/mob/living/carbon/alien/larva/new_xeno = new(xeno_loc)
new_xeno.key = C.key
new_xeno.key = ghost.key
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
new_xeno.canmove = 0 //so we don't move during the bursting animation
new_xeno.notransform = 1
new_xeno.invisibility = INVISIBILITY_MAXIMUM
spawn(6)
if(new_xeno)
new_xeno.canmove = 1
new_xeno.notransform = 0
new_xeno.invisibility = 0
if(gib_on_success)
owner.gib(TRUE)
else
owner.adjustBruteLoss(40)
owner.cut_overlay(overlay)
qdel(src)
sleep(6)
if(QDELETED(src) || QDELETED(owner))
return
if(new_xeno)
new_xeno.canmove = 1
new_xeno.notransform = 0
new_xeno.invisibility = 0
if(gib_on_success)
new_xeno.visible_message("<span class='danger'>[new_xeno] bursts out of [owner] in a shower of gore!</span>", "<span class='userdanger'>You exit [owner], your previous host.</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
owner.gib(TRUE)
else
new_xeno.visible_message("<span class='danger'>[new_xeno] wriggles out of [owner]!</span>", "<span class='userdanger'>You exit [owner], your previous host.</span>")
owner.adjustBruteLoss(40)
owner.cut_overlay(overlay)
qdel(src)
/*----------------------------------------
@@ -64,11 +64,11 @@ var/const/MAX_ACTIVE_TIME = 400
return
switch(stat)
if(DEAD,UNCONSCIOUS)
user << "<span class='boldannounce'>[src] is not moving.</span>"
to_chat(user, "<span class='boldannounce'>[src] is not moving.</span>")
if(CONSCIOUS)
user << "<span class='boldannounce'>[src] seems to be active!</span>"
to_chat(user, "<span class='boldannounce'>[src] seems to be active!</span>")
if (sterile)
user << "<span class='boldannounce'>It looks like the proboscis has been removed.</span>"
to_chat(user, "<span class='boldannounce'>It looks like the proboscis has been removed.</span>")
/obj/item/clothing/mask/facehugger/attackby(obj/item/O,mob/m, params)
if(O.force)
+9 -9
View File
@@ -1,7 +1,7 @@
/mob/living/carbon
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/carbon/New()
/mob/living/carbon/Initialize()
create_reagents(1000)
update_body_parts() //to update the carbon's new bodyparts appearance
..()
@@ -53,7 +53,7 @@
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
if(istype(item_in_hand,/obj/item/weapon/twohanded))
if(item_in_hand:wielded == 1)
usr << "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>"
to_chat(usr, "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>")
return
var/oindex = active_hand_index
active_hand_index = held_index
@@ -252,7 +252,7 @@
buckled.user_unbuckle_mob(src,src)
else
if(src && buckled)
src << "<span class='warning'>You fail to unbuckle yourself!</span>"
to_chat(src, "<span class='warning'>You fail to unbuckle yourself!</span>")
else
buckled.user_unbuckle_mob(src,src)
@@ -293,20 +293,20 @@
var/displaytime = breakouttime / 600
if(!cuff_break)
visible_message("<span class='warning'>[src] attempts to remove [I]!</span>")
src << "<span class='notice'>You attempt to remove [I]... (This will take around [displaytime] minutes and you need to stand still.)</span>"
to_chat(src, "<span class='notice'>You attempt to remove [I]... (This will take around [displaytime] minutes and you need to stand still.)</span>")
if(do_after(src, breakouttime, 0, target = src))
clear_cuffs(I, cuff_break)
else
src << "<span class='warning'>You fail to remove [I]!</span>"
to_chat(src, "<span class='warning'>You fail to remove [I]!</span>")
else if(cuff_break == FAST_CUFFBREAK)
breakouttime = 50
visible_message("<span class='warning'>[src] is trying to break [I]!</span>")
src << "<span class='notice'>You attempt to break [I]... (This will take around 5 seconds and you need to stand still.)</span>"
to_chat(src, "<span class='notice'>You attempt to break [I]... (This will take around 5 seconds and you need to stand still.)</span>")
if(do_after(src, breakouttime, 0, target = src))
clear_cuffs(I, cuff_break)
else
src << "<span class='warning'>You fail to break [I]!</span>"
to_chat(src, "<span class='warning'>You fail to break [I]!</span>")
else if(cuff_break == INSTANT_CUFFBREAK)
clear_cuffs(I, cuff_break)
@@ -343,7 +343,7 @@
if(!I.loc || buckled)
return
visible_message("<span class='danger'>[src] manages to [cuff_break ? "break" : "remove"] [I]!</span>")
src << "<span class='notice'>You successfully [cuff_break ? "break" : "remove"] [I].</span>"
to_chat(src, "<span class='notice'>You successfully [cuff_break ? "break" : "remove"] [I].</span>")
if(cuff_break)
qdel(I)
@@ -731,7 +731,7 @@
O.Remove(src)
O.loc = get_turf(src)
if(organs_amt)
user << "<span class='notice'>You retrieve some of [src]\'s internal organs!</span>"
to_chat(user, "<span class='notice'>You retrieve some of [src]\'s internal organs!</span>")
..()
@@ -10,7 +10,7 @@
return number
/mob/living/carbon/get_ear_protection()
if(head && (head.flags & HEADBANGPROTECT))
if(head && HAS_SECONDARY_FLAG(head, BANG_PROTECT))
return 1
/mob/living/carbon/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
@@ -204,7 +204,7 @@
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
if(on_fire)
M << "<span class='warning'>You can't put them out with just your bare hands!"
to_chat(M, "<span class='warning'>You can't put them out with just your bare hands!")
return
if(health >= 0 && !(status_flags & FAKEDEATH))
@@ -212,7 +212,6 @@
if(lying)
M.visible_message("<span class='notice'>[M] shakes [src] trying to get [p_them()] up!</span>", \
"<span class='notice'>You shake [src] trying to get [p_them()] up!</span>")
else if(check_zone(M.zone_selected) == "head")
M.visible_message("<span class='notice'>[M] gives [src] a pat on the head to make [p_them()] feel better!</span>", \
"<span class='notice'>You give [src] a pat on the head to make [p_them()] feel better!</span>")
@@ -241,16 +240,16 @@
return
if (damage == 1)
src << "<span class='warning'>Your eyes sting a little.</span>"
to_chat(src, "<span class='warning'>Your eyes sting a little.</span>")
if(prob(40))
adjust_eye_damage(1)
else if (damage == 2)
src << "<span class='warning'>Your eyes burn.</span>"
to_chat(src, "<span class='warning'>Your eyes burn.</span>")
adjust_eye_damage(rand(2, 4))
else if( damage > 3)
src << "<span class='warning'>Your eyes itch and burn severely!</span>"
to_chat(src, "<span class='warning'>Your eyes itch and burn severely!</span>")
adjust_eye_damage(rand(12, 16))
if(eye_damage > 10)
@@ -260,18 +259,18 @@
if(eye_damage > 20)
if(prob(eye_damage - 20))
if(become_nearsighted())
src << "<span class='warning'>Your eyes start to burn badly!</span>"
to_chat(src, "<span class='warning'>Your eyes start to burn badly!</span>")
else if(prob(eye_damage - 25))
if(become_blind())
src << "<span class='warning'>You can't see anything!</span>"
to_chat(src, "<span class='warning'>You can't see anything!</span>")
else
src << "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>"
to_chat(src, "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>")
if(has_bane(BANE_LIGHT))
mind.disrupt_spells(-500)
return 1
else if(damage == 0) // just enough protection
if(prob(20))
src << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
to_chat(src, "<span class='notice'>Something bright flashes in the corner of your vision!</span>")
if(has_bane(BANE_LIGHT))
mind.disrupt_spells(0)
@@ -287,12 +286,12 @@
if(deafen_pwr || damage_pwr)
setEarDamage(ear_damage + damage_pwr*effect_amount, max(ear_deaf, deafen_pwr*effect_amount))
if (ear_damage >= 15)
src << "<span class='warning'>Your ears start to ring badly!</span>"
to_chat(src, "<span class='warning'>Your ears start to ring badly!</span>")
if(prob(ear_damage - 5))
src << "<span class='warning'>You can't hear anything!</span>"
to_chat(src, "<span class='warning'>You can't hear anything!</span>")
disabilities |= DEAF
else if(ear_damage >= 5)
src << "<span class='warning'>Your ears start to ring!</span>"
to_chat(src, "<span class='warning'>Your ears start to ring!</span>")
src << sound('sound/weapons/flash_ring.ogg',0,1,0,250)
return effect_amount //how soundbanged we are
+1 -1
View File
@@ -87,4 +87,4 @@
msg += "*---------*</span>"
user << msg
to_chat(user, msg)
@@ -257,7 +257,6 @@
msg += "[t_He] looks like a drunken mess.\n"
if(91.01 to INFINITY)
msg += "[t_He] [t_is] a shitfaced, slobbering wreck.\n"
for (var/I in src.vore_organs)
var/datum/belly/B = vore_organs[I]
msg += B.get_examine_msg()
@@ -282,7 +281,7 @@
else if(!key)
msg += "<span class='deadsay'>[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely.</span>\n"
else if(!client)
msg += "[t_He] [t_has] a vacant, braindead stare...\n"
msg += "[t_He] [t_has] a blank, absent-minded stare and appears completely unresponsive to anything. [t_He] may snap out of it soon.\n"
if(digitalcamo)
msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly inhuman manner.\n"
@@ -330,11 +329,9 @@
msg += "<a href='?src=\ref[src];hud=s;add_crime=1'>\[Add crime\]</a> "
msg += "<a href='?src=\ref[src];hud=s;view_comment=1'>\[View comment log\]</a> "
msg += "<a href='?src=\ref[src];hud=s;add_comment=1'>\[Add comment\]</a>\n"
if(print_flavor_text() && get_visible_name() != "Unknown")//Are we sure we know who this is? Don't show flavor text unless we can recognize them. Prevents certain metagaming with impersonation.
msg += "[print_flavor_text()]\n"
msg += "*---------*</span>"
user << msg
to_chat(user, msg)
+58 -56
View File
@@ -11,9 +11,13 @@
real_name = "Test Dummy"
status_flags = GODMODE|CANPUSH
/mob/living/carbon/human/dummy/New(loc)
..()
if(!initialized)
args[1] = FALSE
Initialize(arglist(args))
/mob/living/carbon/human/New()
/mob/living/carbon/human/Initialize()
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
@@ -246,7 +250,7 @@
if(href_list["item"])
var/slot = text2num(href_list["item"])
if(slot in check_obscured_slots())
usr << "<span class='warning'>You can't reach that! Something is covering it.</span>"
to_chat(usr, "<span class='warning'>You can't reach that! Something is covering it.</span>")
return
if(href_list["pockets"])
@@ -258,10 +262,10 @@
var/delay_denominator = 1
if(pocket_item && !(pocket_item.flags&ABSTRACT))
if(pocket_item.flags & NODROP)
usr << "<span class='warning'>You try to empty [src]'s [pocket_side] pocket, it seems to be stuck!</span>"
usr << "<span class='notice'>You try to empty [src]'s [pocket_side] pocket.</span>"
to_chat(usr, "<span class='warning'>You try to empty [src]'s [pocket_side] pocket, it seems to be stuck!</span>")
to_chat(usr, "<span class='notice'>You try to empty [src]'s [pocket_side] pocket.</span>")
else if(place_item && place_item.mob_can_equip(src, usr, pocket_id, 1) && !(place_item.flags&ABSTRACT))
usr << "<span class='notice'>You try to place [place_item] into [src]'s [pocket_side] pocket.</span>"
to_chat(usr, "<span class='notice'>You try to place [place_item] into [src]'s [pocket_side] pocket.</span>")
delay_denominator = 4
else
return
@@ -282,7 +286,7 @@
show_inv(usr)
else
// Display a warning if the user mocks up
src << "<span class='warning'>You feel your [pocket_side] pocket being fumbled with!</span>"
to_chat(src, "<span class='warning'>You feel your [pocket_side] pocket being fumbled with!</span>")
..()
@@ -332,12 +336,12 @@
return
if(href_list["evaluation"])
if(!getBruteLoss() && !getFireLoss() && !getOxyLoss() && getToxLoss() < 20)
usr << "<span class='notice'>No external injuries detected.</span><br>"
to_chat(usr, "<span class='notice'>No external injuries detected.</span><br>")
return
var/span = "notice"
var/status = ""
if(getBruteLoss())
usr << "<b>Physical trauma analysis:</b>"
to_chat(usr, "<b>Physical trauma analysis:</b>")
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
var/brutedamage = BP.brute_dam
@@ -351,9 +355,9 @@
status = "sustained major trauma!"
span = "userdanger"
if(brutedamage)
usr << "<span class='[span]'>[BP] appears to have [status]</span>"
to_chat(usr, "<span class='[span]'>[BP] appears to have [status]</span>")
if(getFireLoss())
usr << "<b>Analysis of skin burns:</b>"
to_chat(usr, "<b>Analysis of skin burns:</b>")
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
var/burndamage = BP.burn_dam
@@ -367,11 +371,11 @@
status = "major burns!"
span = "userdanger"
if(burndamage)
usr << "<span class='[span]'>[BP] appears to have [status]</span>"
to_chat(usr, "<span class='[span]'>[BP] appears to have [status]</span>")
if(getOxyLoss())
usr << "<span class='danger'>Patient has signs of suffocation, emergency treatment may be required!</span>"
to_chat(usr, "<span class='danger'>Patient has signs of suffocation, emergency treatment may be required!</span>")
if(getToxLoss() > 20)
usr << "<span class='danger'>Gathered data is inconsistent with the analysis, possible cause: poisoning.</span>"
to_chat(usr, "<span class='danger'>Gathered data is inconsistent with the analysis, possible cause: poisoning.</span>")
if(href_list["hud"] == "s")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
@@ -390,7 +394,7 @@
if(!allowed_access)
H << "<span class='warning'>ERROR: Invalid Access</span>"
to_chat(H, "<span class='warning'>ERROR: Invalid Access</span>")
return
if(perpname)
@@ -413,20 +417,20 @@
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
return
usr << "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]"
usr << "<b>Minor Crimes:</b>"
to_chat(usr, "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]")
to_chat(usr, "<b>Minor Crimes:</b>")
for(var/datum/data/crime/c in R.fields["mi_crim"])
usr << "<b>Crime:</b> [c.crimeName]"
usr << "<b>Details:</b> [c.crimeDetails]"
usr << "Added by [c.author] at [c.time]"
usr << "----------"
usr << "<b>Major Crimes:</b>"
to_chat(usr, "<b>Crime:</b> [c.crimeName]")
to_chat(usr, "<b>Details:</b> [c.crimeDetails]")
to_chat(usr, "Added by [c.author] at [c.time]")
to_chat(usr, "----------")
to_chat(usr, "<b>Major Crimes:</b>")
for(var/datum/data/crime/c in R.fields["ma_crim"])
usr << "<b>Crime:</b> [c.crimeName]"
usr << "<b>Details:</b> [c.crimeDetails]"
usr << "Added by [c.author] at [c.time]"
usr << "----------"
usr << "<b>Notes:</b> [R.fields["notes"]]"
to_chat(usr, "<b>Crime:</b> [c.crimeName]")
to_chat(usr, "<b>Details:</b> [c.crimeDetails]")
to_chat(usr, "Added by [c.author] at [c.time]")
to_chat(usr, "----------")
to_chat(usr, "<b>Notes:</b> [R.fields["notes"]]")
return
if(href_list["add_crime"])
@@ -444,7 +448,7 @@
return
var/crime = data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text())
data_core.addMinorCrime(R.fields["id"], crime)
usr << "<span class='notice'>Successfully added a minor crime.</span>"
to_chat(usr, "<span class='notice'>Successfully added a minor crime.</span>")
return
if("Major Crime")
if(R)
@@ -459,7 +463,7 @@
return
var/crime = data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text())
data_core.addMajorCrime(R.fields["id"], crime)
usr << "<span class='notice'>Successfully added a major crime.</span>"
to_chat(usr, "<span class='notice'>Successfully added a major crime.</span>")
return
if(href_list["view_comment"])
@@ -468,11 +472,11 @@
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
return
usr << "<b>Comments/Log:</b>"
to_chat(usr, "<b>Comments/Log:</b>")
var/counter = 1
while(R.fields[text("com_[]", counter)])
usr << R.fields[text("com_[]", counter)]
usr << "----------"
to_chat(usr, R.fields[text("com_[]", counter)])
to_chat(usr, "----------")
counter++
return
@@ -490,9 +494,9 @@
while(R.fields[text("com_[]", counter)])
counter++
R.fields[text("com_[]", counter)] = text("Made by [] on [] [], []<BR>[]", allowed_access, worldtime2text(), time2text(world.realtime, "MMM DD"), year_integer+540, t1)
usr << "<span class='notice'>Successfully added comment.</span>"
to_chat(usr, "<span class='notice'>Successfully added comment.</span>")
return
usr << "<span class='warning'>Unable to locate a data core entry for this person.</span>"
to_chat(usr, "<span class='warning'>Unable to locate a data core entry for this person.</span>")
/mob/living/carbon/human/proc/canUseHUD()
return !(src.stat || src.weakened || src.stunned || src.restrained())
@@ -513,7 +517,7 @@
. = 0
if(!. && error_msg && user)
// Might need re-wording.
user << "<span class='alert'>There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"].</span>"
to_chat(user, "<span class='alert'>There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"].</span>")
/mob/living/carbon/human/proc/check_obscured_slots()
var/list/obscured = list()
@@ -601,7 +605,7 @@
threatcount += 5
//Check for nonhuman scum
if(dna && dna.species.id && dna.species.id != "human" || "lizard" || "canine" || "felid" || "avian" || "shark" || "moth")
if(dna && dna.species.id && dna.species.id != "human" || "lizard" || "mammal" || "avian" || "aquatic" || "insect")
threatcount += 1
//mindshield implants imply trustworthyness
@@ -631,7 +635,7 @@
for(var/obj/item/hand in held_items)
if(prob(current_size * 5) && hand.w_class >= ((11-current_size)/2) && dropItemToGround(hand))
step_towards(hand, src)
src << "<span class='warning'>\The [S] pulls \the [hand] from your grip!</span>"
to_chat(src, "<span class='warning'>\The [S] pulls \the [hand] from your grip!</span>")
rad_act(current_size * 3)
if(mob_negates_gravity())
return
@@ -641,20 +645,20 @@
CHECK_DNA_AND_SPECIES(C)
if(C.stat == DEAD || (C.status_flags & FAKEDEATH))
src << "<span class='warning'>[C.name] is dead!</span>"
to_chat(src, "<span class='warning'>[C.name] is dead!</span>")
return
if(is_mouth_covered())
src << "<span class='warning'>Remove your mask first!</span>"
to_chat(src, "<span class='warning'>Remove your mask first!</span>")
return 0
if(C.is_mouth_covered())
src << "<span class='warning'>Remove [p_their()] mask first!</span>"
to_chat(src, "<span class='warning'>Remove [p_their()] mask first!</span>")
return 0
if(C.cpr_time < world.time + 30)
visible_message("<span class='notice'>[src] is trying to perform CPR on [C.name]!</span>", \
"<span class='notice'>You try to perform CPR on [C.name]... Hold still!</span>")
if(!do_mob(src, C))
src << "<span class='warning'>You fail to perform CPR on [C]!</span>"
to_chat(src, "<span class='warning'>You fail to perform CPR on [C]!</span>")
return 0
var/they_breathe = (!(NOBREATH in C.dna.species.species_traits))
@@ -671,13 +675,11 @@
var/suff = min(C.getOxyLoss(), 7)
C.adjustOxyLoss(-suff)
C.updatehealth()
C << "<span class='unconscious'>You feel a breath of fresh air enter your lungs... It feels good...</span>"
to_chat(C, "<span class='unconscious'>You feel a breath of fresh air enter your lungs... It feels good...</span>")
else if(they_breathe && !they_lung)
C << "<span class='unconscious'>You feel a breath of fresh air... \
but you don't feel any better...</span>"
to_chat(C, "<span class='unconscious'>You feel a breath of fresh air... but you don't feel any better...</span>")
else
C << "<span class='unconscious'>You feel a breath of fresh air... \
which is a sensation you don't recognise...</span>"
to_chat(C, "<span class='unconscious'>You feel a breath of fresh air... which is a sensation you don't recognise...</span>")
/mob/living/carbon/human/generateStaticOverlay()
var/image/staticOverlay = image(icon('icons/effects/effects.dmi', "static"), loc = src)
@@ -781,11 +783,11 @@
var/health_amount = health - staminaloss
if(..(health_amount)) //not dead
switch(hal_screwyhud)
if(1)
if(SCREWYHUD_CRIT)
hud_used.healths.icon_state = "health6"
if(2)
if(SCREWYHUD_DEAD)
hud_used.healths.icon_state = "health7"
if(5)
if(SCREWYHUD_HEALTHY)
hud_used.healths.icon_state = "health0"
if(hud_used.healthdoll)
hud_used.healthdoll.cut_overlays()
@@ -806,7 +808,7 @@
icon_num = 4
if(damage > (comparison*4))
icon_num = 5
if(hal_screwyhud == 5)
if(hal_screwyhud == SCREWYHUD_HEALTHY)
icon_num = 0
if(icon_num)
hud_used.healthdoll.add_overlay(image('icons/mob/screen_gen.dmi',"[BP.body_zone][icon_num]"))
@@ -898,14 +900,14 @@
.["Toggle Purrbation"] = "?_src_=vars;purrbation=\ref[src]"
/mob/living/carbon/human/MouseDrop_T(mob/living/target, mob/living/user)
if((target != pulling) || (grab_state < GRAB_AGGRESSIVE) || (user != target) || !isliving(target) || !isliving(user)) //Get consent first :^)
if((target != pulling) || (grab_state < GRAB_AGGRESSIVE) || (user != target) || !isliving(user) || stat || user.stat)//Get consent first :^)
. = ..()
return
buckle_mob(target, FALSE, TRUE, TRUE)
buckle_mob(target, TRUE, TRUE)
. = ..()
/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE, yes = FALSE)
if(!yes)
/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
if(!force)//humans are only meant to be ridden through piggybacking and special cases
return
if(!is_type_in_typecache(M, can_ride_typecache))
M.visible_message("<span class='warning'>[M] really can't seem to mount [src]...</span>")
@@ -925,9 +927,9 @@
. = ..(M, force, check_loc)
stop_pulling()
/mob/living/carbon/human/unbuckle_mob(mob/living/M)
/mob/living/carbon/human/unbuckle_mob(mob/living/M, force=FALSE)
if(iscarbon(M))
if(riding_datum)
riding_datum.unequip_buckle_inhands(M)
riding_datum.restore_position(M)
. = ..(M)
. = ..(M, force)
@@ -47,7 +47,7 @@
return number
/mob/living/carbon/human/get_ear_protection()
if((ears && (ears.flags & EARBANGPROTECT)) || (head && (head.flags & HEADBANGPROTECT)))
if((ears && HAS_SECONDARY_FLAG(ears, BANG_PROTECT)) || (head && HAS_SECONDARY_FLAG(head, BANG_PROTECT)))
return 1
/mob/living/carbon/human/on_hit(obj/item/projectile/P)
@@ -198,13 +198,15 @@
damage_clothes(15, BRUTE, "melee")
return 1
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M)
/mob/living/carbon/human/attack_hand(mob/user)
if(..()) //to allow surgery to return properly.
return
if(M.a_intent == INTENT_DISARM)
if(M.buckled_mobs && (src in M.buckled_mobs) && M.riding_datum)
M.riding_datum.force_dismount(src)
dna.species.spec_attack_hand(M, src)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.a_intent == INTENT_DISARM)
if(H.buckled_mobs && (src in H.buckled_mobs) && H.riding_datum)
H.riding_datum.force_dismount(src)
dna.species.spec_attack_hand(H, src)
/mob/living/carbon/human/attack_paw(mob/living/carbon/monkey/M)
@@ -401,7 +403,7 @@
damage_clothes(200 - bomb_armor, BRUTE, "bomb")
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
adjustEarDamage(30, 120)
if (prob(70))
if (prob(max(70 - (bomb_armor * 0.5), 0)))
Paralyse(10)
if(3)
@@ -411,7 +413,7 @@
damage_clothes(max(50 - bomb_armor, 0), BRUTE, "bomb")
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
adjustEarDamage(15,60)
if (prob(50))
if (prob(max(50 - (bomb_armor * 0.5), 0)))
Paralyse(8)
take_overall_damage(b_loss,f_loss)
@@ -466,7 +468,7 @@
var/obj/item/organ/heart/heart = getorganslot("heart")
heart.beating = TRUE
if(stat == CONSCIOUS)
src << "<span class='notice'>You feel your heart beating again!</span>"
to_chat(src, "<span class='notice'>You feel your heart beating again!</span>")
. = ..(shock_damage,source,siemens_coeff,safety,override,tesla_shock, illusion, stun)
if(.)
electrocution_animation(40)
@@ -477,7 +479,7 @@
for(var/obj/item/bodypart/L in src.bodyparts)
if(L.status == BODYPART_ROBOTIC)
if(!informed)
src << "<span class='userdanger'>You feel a sharp pain as your robotic limbs overload.</span>"
to_chat(src, "<span class='userdanger'>You feel a sharp pain as your robotic limbs overload.</span>")
informed = 1
switch(severity)
if(1)
@@ -511,7 +513,7 @@
update_inv_neck()
update_inv_head()
else
src << "<span class='notice'>Your [head_clothes.name] protects your head and face from the acid!</span>"
to_chat(src, "<span class='notice'>Your [head_clothes.name] protects your head and face from the acid!</span>")
else
. = get_bodypart("head")
if(.)
@@ -532,7 +534,7 @@
update_inv_w_uniform()
update_inv_wear_suit()
else
src << "<span class='notice'>Your [chest_clothes.name] protects your body from the acid!</span>"
to_chat(src, "<span class='notice'>Your [chest_clothes.name] protects your body from the acid!</span>")
else
. = get_bodypart("chest")
if(.)
@@ -564,7 +566,7 @@
update_inv_w_uniform()
update_inv_wear_suit()
else
src << "<span class='notice'>Your [arm_clothes.name] protects your arms and hands from the acid!</span>"
to_chat(src, "<span class='notice'>Your [arm_clothes.name] protects your arms and hands from the acid!</span>")
else
. = get_bodypart("r_arm")
if(.)
@@ -590,7 +592,7 @@
update_inv_w_uniform()
update_inv_wear_suit()
else
src << "<span class='notice'>Your [leg_clothes.name] protects your legs and feet from the acid!</span>"
to_chat(src, "<span class='notice'>Your [leg_clothes.name] protects your legs and feet from the acid!</span>")
else
. = get_bodypart("r_leg")
if(.)
@@ -679,21 +681,21 @@
status += "numb"
if(status == "")
status = "OK"
src << "\t [status == "OK" ? "\blue" : "\red"] Your [LB.name] is [status]."
to_chat(src, "\t [status == "OK" ? "\blue" : "\red"] Your [LB.name] is [status].")
for(var/obj/item/I in LB.embedded_objects)
src << "\t <a href='byond://?src=\ref[src];embedded_object=\ref[I];embedded_limb=\ref[LB]'>\red There is \a [I] embedded in your [LB.name]!</a>"
to_chat(src, "\t <a href='byond://?src=\ref[src];embedded_object=\ref[I];embedded_limb=\ref[LB]'>\red There is \a [I] embedded in your [LB.name]!</a>")
for(var/t in missing)
src << "<span class='boldannounce'>Your [parse_zone(t)] is missing!</span>"
to_chat(src, "<span class='boldannounce'>Your [parse_zone(t)] is missing!</span>")
if(bleed_rate)
src << "<span class='danger'>You are bleeding!</span>"
to_chat(src, "<span class='danger'>You are bleeding!</span>")
if(staminaloss)
if(staminaloss > 30)
src << "<span class='info'>You're completely exhausted.</span>"
to_chat(src, "<span class='info'>You're completely exhausted.</span>")
else
src << "<span class='info'>You feel fatigued.</span>"
to_chat(src, "<span class='info'>You feel fatigued.</span>")
else
if(wear_suit)
wear_suit.add_fingerprint(M)
@@ -50,4 +50,4 @@ var/global/default_martial_art = new/datum/martial_art
var/datum/personal_crafting/handcrafting
can_buckle = TRUE
buckle_lying = FALSE
can_ride_typecache = list(/mob/living/carbon/human)
can_ride_typecache = list(/mob/living/carbon/human, /mob/living/simple_animal/slime)
@@ -139,14 +139,14 @@
if(G.trigger_guard == TRIGGER_GUARD_NORMAL)
if(src.dna.check_mutation(HULK))
src << "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>"
to_chat(src, "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>")
return 0
if(NOGUNS in src.dna.species.species_traits)
src << "<span class='warning'>Your fingers don't fit in the trigger guard!</span>"
to_chat(src, "<span class='warning'>Your fingers don't fit in the trigger guard!</span>")
return 0
if(martial_art && martial_art.no_guns) //great dishonor to famiry
src << "<span class='warning'>Use of ranged weaponry would bring dishonor to the clan.</span>"
to_chat(src, "<span class='warning'>Use of ranged weaponry would bring dishonor to the clan.</span>")
return 0
return .
@@ -55,6 +55,7 @@
//End bloody footprints
S.step_action()
/mob/living/carbon/human/Moved()
. = ..()
if(buckled_mobs && buckled_mobs.len && riding_datum)
@@ -133,7 +133,7 @@
s_store = I
update_inv_s_store()
else
src << "<span class='danger'>You are trying to equip this item to an unsupported inventory slot. Report this to a coder!</span>"
to_chat(src, "<span class='danger'>You are trying to equip this item to an unsupported inventory slot. Report this to a coder!</span>")
//Item is handled and in slot, valid to call callback, for this proc should always be true
if(!not_handled)
+6 -5
View File
@@ -28,6 +28,7 @@
if (notransform)
return
//citadel code
if(stat != DEAD)
handle_arousal()
@@ -325,13 +326,13 @@
for(var/obj/item/I in BP.embedded_objects)
if(prob(I.embedded_pain_chance))
BP.receive_damage(I.w_class*I.embedded_pain_multiplier)
src << "<span class='userdanger'>\the [I] embedded in your [BP.name] hurts!</span>"
to_chat(src, "<span class='userdanger'>[I] embedded in your [BP.name] hurts!</span>")
if(prob(I.embedded_fall_chance))
BP.receive_damage(I.w_class*I.embedded_fall_pain_multiplier)
BP.embedded_objects -= I
I.loc = get_turf(src)
visible_message("<span class='danger'>\the [I] falls out of [name]'s [BP.name]!</span>","<span class='userdanger'>\the [I] falls out of your [BP.name]!</span>")
visible_message("<span class='danger'>[I] falls out of [name]'s [BP.name]!</span>","<span class='userdanger'>[I] falls out of your [BP.name]!</span>")
if(!has_embedded_objects())
clear_alert("embeddedobject")
@@ -436,15 +437,15 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(drunkenness >= 81)
adjustToxLoss(0.2)
if(prob(5) && !stat)
src << "<span class='warning'>Maybe you should lie down for a bit...</span>"
to_chat(src, "<span class='warning'>Maybe you should lie down for a bit...</span>")
if(drunkenness >= 91)
adjustBrainLoss(0.4)
if(prob(20) && !stat)
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && z == ZLEVEL_STATION) //QoL mainly
src << "<span class='warning'>You're so tired... but you can't miss that shuttle...</span>"
to_chat(src, "<span class='warning'>You're so tired... but you can't miss that shuttle...</span>")
else
src << "<span class='warning'>Just a quick nap...</span>"
to_chat(src, "<span class='warning'>Just a quick nap...</span>")
Sleeping(45)
if(drunkenness >= 101)
+92 -44
View File
@@ -61,6 +61,9 @@
//Flight and floating
var/override_float = 0
//Eyes
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
//Citadel snowflake
var/fixed_mut_color2 = ""
var/fixed_mut_color3 = ""
@@ -69,8 +72,6 @@
var/lang_spoken = HUMAN
var/lang_understood = HUMAN
//Eyes
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
///////////
// PROCS //
///////////
@@ -117,7 +118,7 @@
var/obj/item/organ/heart/heart = C.getorganslot("heart")
var/obj/item/organ/lungs/lungs = C.getorganslot("lungs")
var/obj/item/organ/appendix/appendix = C.getorganslot("appendix")
var/obj/item/organ/eyes/eyes = C.getorganslot("eyes")
var/obj/item/organ/eyes/eyes = C.getorganslot("eye_sight")
if((NOBLOOD in species_traits) && heart)
heart.Remove(C)
@@ -133,7 +134,7 @@
if(eyes)
qdel(eyes)
eyes = new mutanteyes
mutanteyes.Insert(C)
eyes.Insert(C)
if((!(NOBREATH in species_traits)) && !lungs)
if(mutantlungs)
@@ -176,22 +177,49 @@
return
var/datum/sprite_accessory/S
var/list/standing = list()
var/hair_hidden = 0
var/facialhair_hidden = 0
var/hair_hidden = FALSE //ignored if the matching dynamic_X_suffix is non-empty
var/facialhair_hidden = FALSE // ^
var/dynamic_hair_suffix = "" //if this is non-null, and hair+suffix matches an iconstate, then we render that hair instead
var/dynamic_fhair_suffix = ""
//we check if our hat or helmet hides our facial hair.
if(H.head)
var/obj/item/I = H.head
if(istype(I, /obj/item/clothing))
var/obj/item/clothing/C = I
dynamic_fhair_suffix = C.dynamic_fhair_suffix
if(I.flags_inv & HIDEFACIALHAIR)
facialhair_hidden = 1
facialhair_hidden = TRUE
if(H.wear_mask)
var/obj/item/clothing/mask/M = H.wear_mask
dynamic_fhair_suffix = M.dynamic_fhair_suffix //mask > head in terms of facial hair
if(M.flags_inv & HIDEFACIALHAIR)
facialhair_hidden = 1
facialhair_hidden = TRUE
if(H.facial_hair_style && (FACEHAIR in species_traits) && !facialhair_hidden)
if(H.facial_hair_style && (FACEHAIR in species_traits) && (!facialhair_hidden || dynamic_fhair_suffix))
S = facial_hair_styles_list[H.facial_hair_style]
if(S)
var/image/img_facial = image("icon" = S.icon, "icon_state" = "[S.icon_state]", "layer" = -HAIR_LAYER)
//List of all valid dynamic_fhair_suffixes
var/static/list/fextensions
if(!fextensions)
var/icon/fhair_extensions = icon('icons/mob/facialhair_extensions.dmi')
fextensions = list()
for(var/s in fhair_extensions.IconStates(1))
fextensions[s] = TRUE
qdel(fhair_extensions)
//Is hair+dynamic_fhair_suffix a valid iconstate?
var/fhair_state = S.icon_state
var/fhair_file = S.icon
if(fextensions[fhair_state+dynamic_fhair_suffix])
fhair_state += dynamic_fhair_suffix
fhair_file = 'icons/mob/facialhair_extensions.dmi'
var/image/img_facial = image("icon" = fhair_file, "icon_state" = fhair_state, "layer" = -HAIR_LAYER)
if(!forced_colour)
if(hair_color)
@@ -208,24 +236,47 @@
standing += img_facial
//we check if our hat or helmet hides our hair.
if(H.head)
var/obj/item/I = H.head
if(istype(I, /obj/item/clothing))
var/obj/item/clothing/C = I
dynamic_hair_suffix = C.dynamic_hair_suffix
if(I.flags_inv & HIDEHAIR)
hair_hidden = 1
hair_hidden = TRUE
if(H.wear_mask)
var/obj/item/clothing/mask/M = H.wear_mask
if(!dynamic_hair_suffix) //head > mask in terms of head hair
dynamic_hair_suffix = M.dynamic_hair_suffix
if(M.flags_inv & HIDEHAIR)
hair_hidden = 1
if(!hair_hidden)
if(!H.getorgan(/obj/item/organ/brain)) //Applies the debrained overlay if there is no brain
hair_hidden = TRUE
if(!hair_hidden || dynamic_hair_suffix)
if(!hair_hidden && !H.getorgan(/obj/item/organ/brain)) //Applies the debrained overlay if there is no brain
if(!(NOBLOOD in species_traits))
standing += image("icon"='icons/mob/human_face.dmi', "icon_state" = "debrained", "layer" = -HAIR_LAYER)
else if(H.hair_style && (HAIR in species_traits))
S = hair_styles_list[H.hair_style]
if(S)
var/image/img_hair = image("icon" = S.icon, "icon_state" = "[S.icon_state]", "layer" = -HAIR_LAYER)
//List of all valid dynamic_hair_suffixes
var/static/list/extensions
if(!extensions)
var/icon/hair_extensions = icon('icons/mob/hair_extensions.dmi') //hehe
extensions = list()
for(var/s in hair_extensions.IconStates(1))
extensions[s] = TRUE
qdel(hair_extensions)
//Is hair+dynamic_hair_suffix a valid iconstate?
var/hair_state = S.icon_state
var/hair_file = S.icon
if(extensions[hair_state+dynamic_hair_suffix])
hair_state += dynamic_hair_suffix
hair_file = 'icons/mob/hair_extensions.dmi'
var/image/img_hair = image("icon" = hair_file, "icon_state" = hair_state, "layer" = -HAIR_LAYER)
if(!forced_colour)
if(hair_color)
@@ -317,22 +368,22 @@
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
if("tail_lizard" in mutant_bodyparts)
if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT) || !H.dna.features["taur"] == "None")
if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT) || (!H.dna.features["taur"] == "None"))
bodyparts_to_add -= "tail_lizard"
if("waggingtail_lizard" in mutant_bodyparts)
if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT) || !H.dna.features["taur"] == "None")
if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT) || (!H.dna.features["taur"] == "None"))
bodyparts_to_add -= "waggingtail_lizard"
else if ("tail_lizard" in mutant_bodyparts)
bodyparts_to_add -= "waggingtail_lizard"
if("tail_human" in mutant_bodyparts)
if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT) || !H.dna.features["taur"] == "None")
if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT) || (!H.dna.features["taur"] == "None"))
bodyparts_to_add -= "tail_human"
if("waggingtail_human" in mutant_bodyparts)
if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT) || !H.dna.features["taur"] == "None")
if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT) || (!H.dna.features["taur"] == "None"))
bodyparts_to_add -= "waggingtail_human"
else if ("tail_human" in mutant_bodyparts)
bodyparts_to_add -= "waggingtail_human"
@@ -497,7 +548,6 @@
S = /datum/sprite_accessory/slimecoon_ears
if("slimecoonsnout")
S = /datum/sprite_accessory/slimecoon_snout*/
if(!S || S.icon_state == "none")
continue
@@ -568,7 +618,6 @@
I = center_image(I,S.dimension_x,S.dimension_y)
standing += I
if(S.extra) //apply the extra overlay, if there is one
if(S.gender_specific)
icon_string = "[g]_[bodypart]_extra_[S.icon_state]_[layertext]"
@@ -733,7 +782,7 @@
return 0
if(DIGITIGRADE in species_traits)
if(!disable_warning)
H << "<span class='warning'>The footwear around here isn't compatible with your feet!</span>"
to_chat(H, "<span class='warning'>The footwear around here isn't compatible with your feet!</span>")
return 0
return 1
if(slot_belt)
@@ -741,7 +790,7 @@
return 0
if(!H.w_uniform && !nojumpsuit)
if(!disable_warning)
H << "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>"
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
return 0
if( !(I.slot_flags & SLOT_BELT) )
return
@@ -781,7 +830,7 @@
return 0
if(!H.w_uniform && !nojumpsuit)
if(!disable_warning)
H << "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>"
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
return 0
if( !(I.slot_flags & SLOT_ID) )
return 0
@@ -793,7 +842,7 @@
return 0
if(!H.w_uniform && !nojumpsuit)
if(!disable_warning)
H << "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>"
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
return 0
if(I.slot_flags & SLOT_DENYPOCKET)
return
@@ -806,7 +855,7 @@
return 0
if(!H.w_uniform && !nojumpsuit)
if(!disable_warning)
H << "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>"
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
return 0
if(I.slot_flags & SLOT_DENYPOCKET)
return 0
@@ -820,15 +869,15 @@
return 0
if(!H.wear_suit)
if(!disable_warning)
H << "<span class='warning'>You need a suit before you can attach this [I.name]!</span>"
to_chat(H, "<span class='warning'>You need a suit before you can attach this [I.name]!</span>")
return 0
if(!H.wear_suit.allowed)
if(!disable_warning)
H << "You somehow have a suit with no defined allowed items for suit storage, stop that."
to_chat(H, "You somehow have a suit with no defined allowed items for suit storage, stop that.")
return 0
if(I.w_class > WEIGHT_CLASS_BULKY)
if(!disable_warning)
H << "The [I.name] is too big to attach." //should be src?
to_chat(H, "The [I.name] is too big to attach.") //should be src?
return 0
if( istype(I, /obj/item/device/pda) || istype(I, /obj/item/weapon/pen) || is_type_in_list(I, H.wear_suit.allowed) )
return 1
@@ -889,13 +938,13 @@
//The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
if(H.disabilities & FAT)
if(H.overeatduration < 100)
H << "<span class='notice'>You feel fit again!</span>"
to_chat(H, "<span class='notice'>You feel fit again!</span>")
H.disabilities &= ~FAT
H.update_inv_w_uniform()
H.update_inv_wear_suit()
else
if(H.overeatduration > 500)
H << "<span class='danger'>You suddenly feel blubbery!</span>"
to_chat(H, "<span class='danger'>You suddenly feel blubbery!</span>")
H.disabilities |= FAT
H.update_inv_w_uniform()
H.update_inv_wear_suit()
@@ -927,15 +976,15 @@
H.metabolism_efficiency = 1
else if(H.nutrition > NUTRITION_LEVEL_FED && H.satiety > 80)
if(H.metabolism_efficiency != 1.25 && (H.dna && H.dna.species && !(NOHUNGER in H.dna.species.species_traits)))
H << "<span class='notice'>You feel vigorous.</span>"
to_chat(H, "<span class='notice'>You feel vigorous.</span>")
H.metabolism_efficiency = 1.25
else if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
if(H.metabolism_efficiency != 0.8)
H << "<span class='notice'>You feel sluggish.</span>"
to_chat(H, "<span class='notice'>You feel sluggish.</span>")
H.metabolism_efficiency = 0.8
else
if(H.metabolism_efficiency == 1.25)
H << "<span class='notice'>You no longer feel vigorous.</span>"
to_chat(H, "<span class='notice'>You no longer feel vigorous.</span>")
H.metabolism_efficiency = 1
switch(H.nutrition)
@@ -959,24 +1008,23 @@
if(!H.weakened)
H.emote("collapse")
H.Weaken(10)
H << "<span class='danger'>You feel weak.</span>"
to_chat(H, "<span class='danger'>You feel weak.</span>")
switch(H.radiation)
if(50 to 75)
if(prob(5))
if(!H.weakened)
H.emote("collapse")
H.Weaken(3)
H << "<span class='danger'>You feel weak.</span>"
to_chat(H, "<span class='danger'>You feel weak.</span>")
if(prob(15))
if(!( H.hair_style == "Shaved") || !(H.hair_style == "Bald") || (HAIR in species_traits))
H << "<span class='danger'>Your hair starts to \
fall out in clumps...<span>"
to_chat(H, "<span class='danger'>Your hair starts to fall out in clumps...<span>")
addtimer(CALLBACK(src, .proc/go_bald, H), 50)
if(75 to 100)
if(prob(1))
H << "<span class='danger'>You mutate!</span>"
to_chat(H, "<span class='danger'>You mutate!</span>")
H.randmutb()
H.emote("gasp")
H.domutcheck()
@@ -1044,7 +1092,7 @@
if(H.back)
. += H.back.slowdown
for(var/obj/item/I in H.held_items)
if(I.flags & HANDSLOW)
if(HAS_SECONDARY_FLAG(I, SLOWS_WHILE_IN_HAND))
. += I.slowdown
var/health_deficiency = (100 - H.health + H.staminaloss)
var/hungry = (500 - H.nutrition) / 5 // So overeat would be 100 and default level would be 80
@@ -1082,9 +1130,9 @@
if(we_breathe && we_lung)
user.do_cpr(target)
else if(we_breathe && !we_lung)
user << "<span class='warning'>You have no lungs to breathe with, so you cannot peform CPR.</span>"
to_chat(user, "<span class='warning'>You have no lungs to breathe with, so you cannot peform CPR.</span>")
else
user << "<span class='notice'>You do not breathe, so you cannot perform CPR.</span>"
to_chat(user, "<span class='notice'>You do not breathe, so you cannot perform CPR.</span>")
/datum/species/proc/grab(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(target.check_block())
@@ -1192,7 +1240,7 @@
if(randn <= 60)
//BubbleWrap: Disarming breaks a pull
if(target.pulling)
target << "<span class='warning'>[user] has broken [target]'s grip on [target.pulling]!</span>"
to_chat(target, "<span class='warning'>[user] has broken [target]'s grip on [target.pulling]!</span>")
talked = 1
target.stop_pulling()
//End BubbleWrap
@@ -50,7 +50,7 @@
if(H.stat || H.stunned || H.weakened)
return 0
if(H.wear_suit && ((H.wear_suit.flags_inv & HIDEJUMPSUIT) && (!H.wear_suit.species_exception || !is_type_in_list(src, H.wear_suit.species_exception)))) //Jumpsuits have tail holes, so it makes sense they have wing holes too
H << "Your suit blocks your wings from extending!"
to_chat(H, "Your suit blocks your wings from extending!")
return 0
var/turf/T = get_turf(H)
if(!T)
@@ -58,7 +58,7 @@
var/datum/gas_mixture/environment = T.return_air()
if(environment && !(environment.return_pressure() > 30))
H << "<span class='warning'>The atmosphere is too thin for you to fly!</span>"
to_chat(H, "<span class='warning'>The atmosphere is too thin for you to fly!</span>")
return 0
else
return 1
@@ -73,11 +73,11 @@
var/datum/species/angel/A = H.dna.species
if(A.CanFly(H))
if(H.movement_type & FLYING)
H << "<span class='notice'>You settle gently back onto the ground...</span>"
to_chat(H, "<span class='notice'>You settle gently back onto the ground...</span>")
A.ToggleFlight(H,0)
H.update_canmove()
else
H << "<span class='notice'>You beat your wings and begin to hover gently above the ground...</span>"
to_chat(H, "<span class='notice'>You beat your wings and begin to hover gently above the ground...</span>")
H.resting = 0
A.ToggleFlight(H,1)
H.update_canmove()
@@ -87,7 +87,7 @@
if(H.buckled)
buckled_obj = H.buckled
H << "<span class='notice'>Your wings spazz out and launch you!</span>"
to_chat(H, "<span class='notice'>Your wings spazz out and launch you!</span>")
playsound(H.loc, 'sound/misc/slip.ogg', 50, 1, -3)
@@ -32,7 +32,7 @@
var/datum/species/golem/golem_type = pick(golem_types)
var/mob/living/carbon/human/H = C
H.set_species(golem_type)
H << "[initial(golem_type.info_text)]"
to_chat(H, "[initial(golem_type.info_text)]")
/datum/species/golem/adamantine
name = "Adamantine Golem"
@@ -183,11 +183,11 @@
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(H.loc)) //else, there's considered to be no light
var/turf/T = H.loc
light_amount = min(10,T.get_lumcount()) - 5
H.nutrition += light_amount
light_amount = min(1,T.get_lumcount()) - 0.5
H.nutrition += light_amount * 10
if(H.nutrition > NUTRITION_LEVEL_FULL)
H.nutrition = NUTRITION_LEVEL_FULL
if(light_amount > 2) //if there's enough light, heal
if(light_amount > 0.2) //if there's enough light, heal
H.heal_overall_damage(1,1)
H.adjustToxLoss(-1)
H.adjustOxyLoss(-1)
@@ -444,4 +444,48 @@
playsound(get_turf(H), 'sound/misc/sadtrombone.ogg', 70, 0)
/datum/species/golem/bananium/get_spans()
return list(SPAN_CLOWN)
return list(SPAN_CLOWN)
/datum/species/golem/runic
name = "Runic Golem"
id = "runic"
limbs_id = "cultgolem"
sexes = FALSE
info_text = "As a <span class='danger'>Runic Golem</span>, you possess eldritch powers granted by the Elder God Nar'Sie."
species_traits = list(NOBREATH,RESISTHOT,RESISTCOLD,RESISTPRESSURE,NOFIRE,NOGUNS,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NODISMEMBER) //no mutcolors
var/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/golem/phase_shift
var/obj/effect/proc_holder/spell/targeted/abyssal_gaze/abyssal_gaze
var/obj/effect/proc_holder/spell/targeted/dominate/dominate
/datum/species/golem/runic/on_species_gain(mob/living/carbon/C, datum/species/old_species)
. = ..()
C.faction |= "cult"
phase_shift = new
C.AddSpell(phase_shift)
abyssal_gaze = new
C.AddSpell(abyssal_gaze)
dominate = new
C.AddSpell(dominate)
/datum/species/golem/runic/on_species_loss(mob/living/carbon/C)
. = ..()
C.faction -= "cult"
if(phase_shift)
C.RemoveSpell(phase_shift)
if(abyssal_gaze)
C.RemoveSpell(abyssal_gaze)
if(dominate)
C.RemoveSpell(dominate)
/datum/species/golem/runic/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == "holywater")
H.adjustFireLoss(4)
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
if(chem.id == "unholywater")
H.adjustBruteLoss(-4)
H.adjustFireLoss(-4)
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
@@ -26,7 +26,7 @@
if(!H.blood_volume)
H.blood_volume += 5
H.adjustBruteLoss(5)
H << "<span class='danger'>You feel empty!</span>"
to_chat(H, "<span class='danger'>You feel empty!</span>")
if(H.blood_volume < BLOOD_VOLUME_NORMAL)
if(H.nutrition >= NUTRITION_LEVEL_STARVING)
@@ -34,7 +34,7 @@
H.nutrition -= 2.5
if(H.blood_volume < BLOOD_VOLUME_OKAY)
if(prob(5))
H << "<span class='danger'>You feel drained!</span>"
to_chat(H, "<span class='danger'>You feel drained!</span>")
if(H.blood_volume < BLOOD_VOLUME_BAD)
Cannibalize_Body(H)
H.update_action_buttons_icon()
@@ -49,7 +49,7 @@
limbs_to_consume -= list("r_arm", "l_arm")
consumed_limb = H.get_bodypart(pick(limbs_to_consume))
consumed_limb.drop_limb()
H << "<span class='userdanger'>Your [consumed_limb] is drawn back into your body, unable to maintain its shape!</span>"
to_chat(H, "<span class='userdanger'>Your [consumed_limb] is drawn back into your body, unable to maintain its shape!</span>")
qdel(consumed_limb)
H.blood_volume += 20
@@ -73,13 +73,13 @@
var/mob/living/carbon/human/H = owner
var/list/limbs_to_heal = H.get_missing_limbs()
if(limbs_to_heal.len < 1)
H << "<span class='notice'>You feel intact enough as it is.</span>"
to_chat(H, "<span class='notice'>You feel intact enough as it is.</span>")
return
H << "<span class='notice'>You focus intently on your missing [limbs_to_heal.len >= 2 ? "limbs" : "limb"]...</span>"
to_chat(H, "<span class='notice'>You focus intently on your missing [limbs_to_heal.len >= 2 ? "limbs" : "limb"]...</span>")
if(H.blood_volume >= 40*limbs_to_heal.len+BLOOD_VOLUME_OKAY)
H.regenerate_limbs()
H.blood_volume -= 40*limbs_to_heal.len
H << "<span class='notice'>...and after a moment you finish reforming!</span>"
to_chat(H, "<span class='notice'>...and after a moment you finish reforming!</span>")
return
else if(H.blood_volume >= 40)//We can partially heal some limbs
while(H.blood_volume >= BLOOD_VOLUME_OKAY+40)
@@ -87,9 +87,9 @@
H.regenerate_limb(healed_limb)
limbs_to_heal -= healed_limb
H.blood_volume -= 40
H << "<span class='warning'>...but there is not enough of you to fix everything! You must attain more mass to heal completely!</span>"
to_chat(H, "<span class='warning'>...but there is not enough of you to fix everything! You must attain more mass to heal completely!</span>")
return
H << "<span class='warning'>...but there is not enough of you to go around! You must attain more mass to heal!</span>"
to_chat(H, "<span class='warning'>...but there is not enough of you to go around! You must attain more mass to heal!</span>")
////////////////////////////////////////////////////////SLIME PEOPLE///////////////////////////////////////////////////////////////////
@@ -128,8 +128,8 @@
/* slime_split = new
slime_split.Grant(C)
swap_body = new
swap_body.Grant(C)
*/
swap_body.Grant(C) */
if(!bodies || !bodies.len)
bodies = list(C)
else
@@ -140,7 +140,7 @@
/datum/species/jelly/slime/spec_life(mob/living/carbon/human/H)
if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT)
if(prob(5))
H << "<span class='notice'>You feel very bloated!</span>"
to_chat(H, "<span class='notice'>You feel very bloated!</span>")
else if(H.nutrition >= NUTRITION_LEVEL_WELL_FED)
H.blood_volume += 3
H.nutrition -= 2.5
@@ -176,11 +176,9 @@
if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT)
make_dupe()
else
H << "<span class='warning'>...but there is not enough of you to \
go around! You must attain more mass to split!</span>"
to_chat(H, "<span class='warning'>...but there is not enough of you to go around! You must attain more mass to split!</span>")
else
H << "<span class='warning'>...but fail to stand perfectly still!\
</span>"
to_chat(H, "<span class='warning'>...but fail to stand perfectly still!</span>")
H.notransform = FALSE
@@ -223,7 +221,7 @@
/datum/action/innate/swap_body/Activate()
if(!isslimeperson(owner))
owner << "<span class='warning'>You are not a slimeperson.</span>"
to_chat(owner, "<span class='warning'>You are not a slimeperson.</span>")
Remove(owner)
else
ui_interact(owner)
@@ -27,11 +27,11 @@
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(H.loc)) //else, there's considered to be no light
var/turf/T = H.loc
light_amount = min(10,T.get_lumcount()) - 5
H.nutrition += light_amount
light_amount = min(1,T.get_lumcount()) - 0.5
H.nutrition += light_amount * 10
if(H.nutrition > NUTRITION_LEVEL_FULL)
H.nutrition = NUTRITION_LEVEL_FULL
if(light_amount > 2) //if there's enough light, heal
if(light_amount > 0.2) //if there's enough light, heal
H.heal_overall_damage(1,1)
H.adjustToxLoss(-1)
H.adjustOxyLoss(-1)
@@ -61,4 +61,4 @@
H.adjustFireLoss(rand(5,15))
H.show_message("<span class='userdanger'>The radiation beam singes you!</span>")
if(/obj/item/projectile/energy/florayield)
H.nutrition = min(H.nutrition+30, NUTRITION_LEVEL_FULL)
H.nutrition = min(H.nutrition+30, NUTRITION_LEVEL_FULL)
@@ -17,7 +17,7 @@
var/turf/T = H.loc
light_amount = T.get_lumcount()
if(light_amount > 2) //if there's enough light, start dying
if(light_amount > 0.2) //if there's enough light, start dying
H.take_overall_damage(1,1)
else if (light_amount < 2) //heal in the dark
H.heal_overall_damage(1,1)
else if (light_amount < 0.2) //heal in the dark
H.heal_overall_damage(1,1)
@@ -6,7 +6,11 @@
/mob/living/carbon/human/Weaken(amount, updating = 1, ignore_canstun = 0)
amount = dna.species.spec_stun(src,amount)
return ..()
/mob/living/carbon/human/Paralyse(amount, updating = 1, ignore_canstun = 0)
amount = dna.species.spec_stun(src,amount)
return ..()
/mob/living/carbon/human/cure_husk()
. = ..()
if(.)
@@ -15,4 +19,4 @@
/mob/living/carbon/human/become_husk()
. = ..()
if(.)
update_hair()
update_hair()
@@ -71,6 +71,7 @@ There are several things that need to be remembered:
/mob/living/carbon/human/regenerate_icons()
if(!..())
icon_render_key = null //invalidate bodyparts cache
update_body()
update_hair()
update_inv_w_uniform()
@@ -265,10 +266,10 @@ There are several things that need to be remembered:
if(hud_used.inventory_shown) //if the inventory is open
client.screen += shoes //add it to client's screen
update_observer_view(shoes,1)
var/image/standing = shoes.build_worn_icon(state = shoes.icon_state, default_layer = SHOES_LAYER, default_icon_file = 'icons/mob/feet.dmi')
if("taur" in dna.species.mutant_bodyparts)
switch(dna.features["taur"])
if(!"Naga" || "None")
var/image/standing = shoes.build_worn_icon(state = shoes.icon_state, default_layer = SHOES_LAYER, default_icon_file = 'icons/mob/feet.dmi')
overlays_standing[SHOES_LAYER] = standing
apply_overlay(SHOES_LAYER)
@@ -5,7 +5,7 @@
return
if(say_disabled) //This is here to try to identify lag problems
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
if(stat == DEAD)
@@ -21,7 +21,7 @@
if (src.client)
if (src.client.prefs.muted & MUTE_IC)
src << "<span class='danger'>You cannot whisper (muted).</span>"
to_chat(src, "<span class='danger'>You cannot whisper (muted).</span>")
return
log_whisper("[src.name]/[src.key] : [message]")
@@ -29,7 +29,7 @@
if(!weakened)
emote("collapse")
Weaken(10)
src << "<span class='danger'>You feel weak.</span>"
to_chat(src, "<span class='danger'>You feel weak.</span>")
switch(radiation)
@@ -38,11 +38,11 @@
if(!weakened)
emote("collapse")
Weaken(3)
src << "<span class='danger'>You feel weak.</span>"
to_chat(src, "<span class='danger'>You feel weak.</span>")
if(75 to 100)
if(prob(1))
src << "<span class='danger'>You mutate!</span>"
to_chat(src, "<span class='danger'>You mutate!</span>")
randmutb()
emote("gasp")
domutcheck()
@@ -19,7 +19,7 @@
/mob/living/carbon/monkey/New()
/mob/living/carbon/monkey/Initialize()
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
@@ -167,13 +167,13 @@
if(!(wear_mask.resistance_flags & UNACIDABLE))
wear_mask.acid_act(acidpwr)
else
src << "<span class='warning'>Your mask protects you from the acid.</span>"
to_chat(src, "<span class='warning'>Your mask protects you from the acid.</span>")
return
if(head)
if(!(head.resistance_flags & UNACIDABLE))
head.acid_act(acidpwr)
else
src << "<span class='warning'>Your hat protects you from the acid.</span>"
to_chat(src, "<span class='warning'>Your hat protects you from the acid.</span>")
return
take_bodypart_damage(acidpwr * min(0.6, acid_volume*0.1))
@@ -9,7 +9,7 @@
var/list/pet_monkey_names = list("Pun Pun", "Bubbles", "Mojo", "George", "Darwin", "Aldo", "Caeser", "Kanzi", "Kong", "Terk", "Grodd", "Mala", "Bojangles", "Coco", "Able", "Baker", "Scatter", "Norbit", "Travis")
var/list/rare_pet_monkey_names = list("Professor Bobo", "Deempisi's Revenge", "Furious George", "King Louie", "Dr. Zaius", "Jimmy Rustles", "Dinner", "Lanky")
/mob/living/carbon/monkey/punpun/New()
/mob/living/carbon/monkey/punpun/Initialize()
Read_Memory()
if(ancestor_name)
name = ancestor_name
+2 -2
View File
@@ -52,7 +52,7 @@
if(mind && mind.name && mind.active && (!(T.flags & NO_DEATHRATTLE)))
var/area/A = get_area(T)
var/rendered = "<span class='deadsay'><b>[mind.name]</b> has died at <b>[A.name]</b>.</span>"
deadchat_broadcast(rendered, follow_target = src, message_type=DEADCHAT_DEATHRATTLE)
deadchat_broadcast(rendered, follow_target = src, turf_target = T, message_type=DEADCHAT_DEATHRATTLE)
if(mind)
mind.store_memory("Time of death: [tod]", 0)
living_mob_list -= src
@@ -65,7 +65,7 @@
SetSleeping(0, 0)
blind_eyes(1)
reset_perspective(null)
hide_fullscreens()
reload_fullscreen()
update_action_buttons_icon()
update_damage_hud()
update_health_hud()
+8 -8
View File
@@ -9,7 +9,7 @@
var/datum/emote/E = emote_list[act]
if(!E)
src << "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>"
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
return
E.run_emote(src, param, m_type)
@@ -380,22 +380,22 @@
/datum/emote/living/custom/proc/check_invalid(mob/user, input)
. = TRUE
if(copytext(input,1,5) == "says")
user << "<span class='danger'>Invalid emote.</span>"
to_chat(user, "<span class='danger'>Invalid emote.</span>")
else if(copytext(input,1,9) == "exclaims")
user << "<span class='danger'>Invalid emote.</span>"
to_chat(user, "<span class='danger'>Invalid emote.</span>")
else if(copytext(input,1,6) == "yells")
user << "<span class='danger'>Invalid emote.</span>"
to_chat(user, "<span class='danger'>Invalid emote.</span>")
else if(copytext(input,1,5) == "asks")
user << "<span class='danger'>Invalid emote.</span>"
to_chat(user, "<span class='danger'>Invalid emote.</span>")
else
. = FALSE
/datum/emote/living/custom/run_emote(mob/user, params, type_override = null)
if(jobban_isbanned(user, "emote"))
user << "You cannot send custom emotes (banned)."
to_chat(user, "You cannot send custom emotes (banned).")
return FALSE
else if(user.client && user.client.prefs.muted & MUTE_IC)
user << "You cannot send IC messages (muted)."
to_chat(user, "You cannot send IC messages (muted).")
return FALSE
else if(!params)
var/custom_emote = copytext(sanitize(input("Choose an emote to display.") as text|null), 1, MAX_MESSAGE_LEN)
@@ -444,7 +444,7 @@
message = jointext(message, "")
user << message
to_chat(user, message)
/datum/emote/sound/beep
key = "beep"
+23 -25
View File
@@ -1,4 +1,4 @@
/mob/living/New()
/mob/living/Initialize()
. = ..()
generateStaticOverlay()
if(staticOverlays.len)
@@ -109,7 +109,7 @@
var/mob/living/L = M
if(L.pulledby && L.pulledby != src && L.restrained())
if(!(world.time % 5))
src << "<span class='warning'>[L] is restrained, you cannot push past.</span>"
to_chat(src, "<span class='warning'>[L] is restrained, you cannot push past.</span>")
return 1
if(L.pulling)
@@ -117,7 +117,7 @@
var/mob/P = L.pulling
if(P.restrained())
if(!(world.time % 5))
src << "<span class='warning'>[L] is restraining [P], you cannot push past.</span>"
to_chat(src, "<span class='warning'>[L] is restraining [P], you cannot push past.</span>")
return 1
if(moving_diagonally)//no mob swap during diagonal moves.
@@ -157,7 +157,6 @@
// In case of micros, we don't swap positions; instead occupying the same square!
if (handle_micro_bump_helping(src))
return
return 1
//okay, so we didn't switch. but should we push?
@@ -210,7 +209,7 @@
set name = "Pull"
set category = "Object"
if(istype(AM) && AM.Adjacent(src))
if(istype(AM) && Adjacent(AM))
start_pulling(AM)
else
stop_pulling()
@@ -229,11 +228,11 @@
/mob/living/verb/succumb(whispered as null)
set hidden = 1
if (InCritical())
src.attack_log += "[src] has [whispered ? "whispered his final words" : "succumbed to death"] with [round(health, 0.1)] points of health!"
src.log_message("Has [whispered ? "whispered his final words" : "succumbed to death"] with [round(health, 0.1)] points of health!", INDIVIDUAL_ATTACK_LOG)
src.adjustOxyLoss(src.health - HEALTH_THRESHOLD_DEAD)
updatehealth()
if(!whispered)
src << "<span class='notice'>You have given up life and succumbed to death.</span>"
to_chat(src, "<span class='notice'>You have given up life and succumbed to death.</span>")
death()
/mob/living/incapacitated(ignore_restraints, ignore_grab)
@@ -282,7 +281,7 @@
set category = "IC"
if(sleeping)
src << "<span class='notice'>You are already sleeping.</span>"
to_chat(src, "<span class='notice'>You are already sleeping.</span>")
return
else
if(alert(src, "You sure you want to sleep for a while?", "Sleep", "Yes", "No") == "Yes")
@@ -296,7 +295,7 @@
set category = "IC"
resting = !resting
src << "<span class='notice'>You are now [resting ? "resting" : "getting up"].</span>"
to_chat(src, "<span class='notice'>You are now [resting ? "resting" : "getting up"].</span>")
update_canmove()
//Recursive function to find everything a mob is holding.
@@ -407,11 +406,11 @@
if(config.allow_Metadata)
if(client)
src << "[src]'s Metainfo:<br>[client.prefs.metadata]"
to_chat(src, "[src]'s Metainfo:<br>[client.prefs.metadata]")
else
src << "[src] does not have any stored infomation!"
to_chat(src, "[src] does not have any stored infomation!")
else
src << "OOC Metadata is not supported by this server!"
to_chat(src, "OOC Metadata is not supported by this server!")
return
@@ -562,10 +561,10 @@
C.container_resist(src)
else if(has_status_effect(/datum/status_effect/freon))
src << "You start breaking out of the ice cube!"
to_chat(src, "You start breaking out of the ice cube!")
if(do_mob(src, src, 40))
if(has_status_effect(/datum/status_effect/freon))
src << "You break out of the ice cube!"
to_chat(src, "You break out of the ice cube!")
remove_status_effect(/datum/status_effect/freon)
update_canmove()
@@ -633,7 +632,7 @@
// Override if a certain type of mob should be behave differently when stripping items (can't, for example)
/mob/living/stripPanelUnequip(obj/item/what, mob/who, where)
if(what.flags & NODROP)
src << "<span class='warning'>You can't remove \the [what.name], it appears to be stuck!</span>"
to_chat(src, "<span class='warning'>You can't remove \the [what.name], it appears to be stuck!</span>")
return
who.visible_message("<span class='danger'>[src] tries to remove [who]'s [what.name].</span>", \
"<span class='userdanger'>[src] tries to remove [who]'s [what.name].</span>")
@@ -654,7 +653,7 @@
/mob/living/stripPanelEquip(obj/item/what, mob/who, where)
what = src.get_active_held_item()
if(what && (what.flags & NODROP))
src << "<span class='warning'>You can't put \the [what.name] on [who], it's stuck to your hand!</span>"
to_chat(src, "<span class='warning'>You can't put \the [what.name] on [who], it's stuck to your hand!</span>")
return
if(what)
var/list/where_list
@@ -667,7 +666,7 @@
final_where = where
if(!what.mob_can_equip(who, src, final_where, TRUE))
src << "<span class='warning'>\The [what.name] doesn't fit in that place!</span>"
to_chat(src, "<span class='warning'>\The [what.name] doesn't fit in that place!</span>")
return
visible_message("<span class='notice'>[src] tries to put [what] on [who].</span>")
@@ -789,11 +788,11 @@
if(be_close && in_range(M, src))
return 1
else
src << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
/mob/living/proc/can_use_guns(var/obj/item/weapon/gun/G)
if (G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
src << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 0
return 1
@@ -804,7 +803,7 @@
if(staminaloss)
var/total_health = (health - staminaloss)
if(total_health <= HEALTH_THRESHOLD_CRIT && !stat)
src << "<span class='notice'>You're too exhausted to keep going...</span>"
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
Weaken(5)
setStaminaLoss(health - 2)
update_health_hud()
@@ -860,8 +859,7 @@
var/mob/living/simple_animal/hostile/guardian/G = para
G.summoner = new_mob
G.Recall()
G << "<span class='holoparasite'>Your summoner has changed \
form!</span>"
to_chat(G, "<span class='holoparasite'>Your summoner has changed form!</span>")
/mob/living/proc/fakefireextinguish()
return
@@ -877,7 +875,7 @@
on_fire = 1
src.visible_message("<span class='warning'>[src] catches fire!</span>", \
"<span class='userdanger'>You're set on fire!</span>")
src.AddLuminosity(3)
src.set_light(3)
throw_alert("fire", /obj/screen/alert/fire)
update_fire()
return TRUE
@@ -887,7 +885,7 @@
if(on_fire)
on_fire = 0
fire_stacks = 0
src.AddLuminosity(-3)
src.set_light(0)
clear_alert("fire")
update_fire()
@@ -930,4 +928,4 @@
/mob/living/post_buckle_mob(mob/living/M)
if(riding_datum)
riding_datum.handle_vehicle_offsets()
riding_datum.handle_vehicle_layer()
riding_datum.handle_vehicle_layer()
+19 -13
View File
@@ -6,19 +6,19 @@
if(armor && armour_penetration)
armor = max(0, armor - armour_penetration)
if(penetrated_text)
src << "<span class='userdanger'>[penetrated_text]</span>"
to_chat(src, "<span class='userdanger'>[penetrated_text]</span>")
else
src << "<span class='userdanger'>Your armor was penetrated!</span>"
to_chat(src, "<span class='userdanger'>Your armor was penetrated!</span>")
else if(armor >= 100)
if(absorb_text)
src << "<span class='userdanger'>[absorb_text]</span>"
to_chat(src, "<span class='userdanger'>[absorb_text]</span>")
else
src << "<span class='userdanger'>Your armor absorbs the blow!</span>"
to_chat(src, "<span class='userdanger'>Your armor absorbs the blow!</span>")
else if(armor > 0)
if(soften_text)
src << "<span class='userdanger'>[soften_text]</span>"
to_chat(src, "<span class='userdanger'>[soften_text]</span>")
else
src << "<span class='userdanger'>Your armor softens the blow!</span>"
to_chat(src, "<span class='userdanger'>Your armor softens the blow!</span>")
return armor
@@ -129,7 +129,7 @@
return
if(!(status_flags & CANPUSH))
user << "<span class='warning'>[src] can't be grabbed more aggressively!</span>"
to_chat(user, "<span class='warning'>[src] can't be grabbed more aggressively!</span>")
return 0
grippedby(user)
@@ -173,7 +173,7 @@
/mob/living/attack_slime(mob/living/simple_animal/slime/M)
if(!ticker || !ticker.mode)
M << "You cannot attack people before the game has started."
to_chat(M, "You cannot attack people before the game has started.")
return
if(M.buckled)
@@ -205,12 +205,12 @@
/mob/living/attack_paw(mob/living/carbon/monkey/M)
if(isturf(loc) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
to_chat(M, "No attacking people at spawn, you jackass.")
return 0
if (M.a_intent == INTENT_HARM)
if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
M << "<span class='warning'>You can't bite with your mouth covered!</span>"
to_chat(M, "<span class='warning'>You can't bite with your mouth covered!</span>")
return 0
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
if (prob(75))
@@ -245,7 +245,7 @@
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M)
if(isturf(loc) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
to_chat(M, "No attacking people at spawn, you jackass.")
return 0
switch(M.a_intent)
@@ -300,8 +300,11 @@
return(gain)
/mob/living/narsie_act()
if(status_flags & GODMODE)
return
if(is_servant_of_ratvar(src) && !stat)
src << "<span class='userdanger'>You resist Nar-Sie's influence... but not all of it. <i>Run!</i></span>"
to_chat(src, "<span class='userdanger'>You resist Nar-Sie's influence... but not all of it. <i>Run!</i></span>")
adjustBruteLoss(35)
if(src && reagents)
reagents.add_reagent("heparin", 5)
@@ -324,11 +327,14 @@
/mob/living/ratvar_act()
if(status_flags & GODMODE)
return
if(stat != DEAD && !is_servant_of_ratvar(src))
for(var/obj/item/weapon/implant/mindshield/M in implants)
qdel(M)
if(!add_servant_of_ratvar(src))
src << "<span class='userdanger'>A blinding light boils you alive! <i>Run!</i></span>"
to_chat(src, "<span class='userdanger'>A blinding light boils you alive! <i>Run!</i></span>")
adjustFireLoss(35)
if(src)
adjust_fire_stacks(1)
@@ -54,8 +54,6 @@
var/smoke_delay = 0 //used to prevent spam with smoke reagent reaction on mob.
var/list/say_log = list() //a log of what we've said, with a timestamp as the key for each message
var/bubble_icon = "default" //what icon the mob uses for speechbubbles
var/last_bumped = 0
+1 -1
View File
@@ -15,7 +15,7 @@
//Vents
if(ventcrawler)
src << "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>"
to_chat(src, "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>")
if(ranged_ability)
ranged_ability.add_ranged_ability(src, "<span class='notice'>You currently have <b>[ranged_ability]</b> active!</span>")
+40 -26
View File
@@ -18,6 +18,8 @@ var/list/department_radio_keys = list(
":g" = "changeling", "#g" = "changeling", ".g" = "changeling",
":y" = "Centcom", "#y" = "Centcom", ".y" = "Centcom",
":x" = "cords", "#x" = "cords", ".x" = "cords",
":p" = "admin", "#p" = "admin", ".p" = "admin",
":d" = "deadmin", "#d" = "deadmin", ".d" = "deadmin",
":R" = "right hand", "#R" = "right hand", ".R" = "right hand",
":L" = "left hand", "#L" = "left hand", ".L" = "left hand",
@@ -38,6 +40,8 @@ var/list/department_radio_keys = list(
":G" = "changeling", "#G" = "changeling", ".G" = "changeling",
":Y" = "Centcom", "#Y" = "Centcom", ".Y" = "Centcom",
":X" = "cords", "#X" = "cords", ".X" = "cords",
":P" = "admin", "#P" = "admin", ".P" = "admin",
":D" = "deadmin", "#D" = "deadmin", ".D" = "deadmin",
//kinda localization -- rastaf0
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
@@ -66,21 +70,8 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
if(!message || message == "")
return
if(stat == DEAD)
say_dead(message)
return
if(check_emote(message))
return
if(!can_speak_basic(message)) //Stat is seperate so I can handle whispers properly.
return
var/message_mode = get_message_mode(message)
if(stat && !(message_mode in crit_allowed_modes))
return
var/original_message = message
if(message_mode == MODE_HEADSET || message_mode == MODE_ROBOT)
message = copytext(message, 2)
@@ -89,11 +80,34 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
if(findtext(message, " ", 1, 2))
message = copytext(message, 2)
if(message_mode == "admin")
if(client)
client.cmd_admin_say(message)
return
if(message_mode == "deadmin")
if(client)
client.dsay(message)
return
if(stat == DEAD)
say_dead(original_message)
return
if(check_emote(original_message))
return
if(!can_speak_basic(original_message)) //Stat is seperate so I can handle whispers properly.
return
if(stat && !(message_mode in crit_allowed_modes))
return
if(handle_inherent_channels(message, message_mode)) //Hiveminds, binary chat & holopad.
return
if(!can_speak_vocal(message))
src << "<span class='warning'>You find yourself unable to speak!</span>"
to_chat(src, "<span class='warning'>You find yourself unable to speak!</span>")
return
if(message_mode != MODE_WHISPER) //whisper() calls treat_message(); double process results in "hisspering"
@@ -102,7 +116,7 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
spans += get_spans()
//Log what we've said with an associated timestamp, using the list's len for safety/to prevent overwriting messages
say_log["[LAZYLEN(say_log) + 1]\[[time_stamp()]\]"] = message
log_message(message, INDIVIDUAL_SAY_LOG)
var/message_range = 7
var/radio_return = radio(message, message_mode, spans)
@@ -175,7 +189,7 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
/mob/living/proc/can_speak_basic(message) //Check BEFORE handling of xeno and ling channels
if(client)
if(client.prefs.muted & MUTE_IC)
src << "<span class='danger'>You cannot speak in IC (muted).</span>"
to_chat(src, "<span class='danger'>You cannot speak in IC (muted).</span>")
return 0
if(client.handle_spam_prevention(message,MUTE_IC))
return 0
@@ -213,34 +227,34 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
for(var/mob/M in mob_list)
if(M in dead_mob_list)
var/link = FOLLOW_LINK(M, src)
M << "[link] [msg]"
to_chat(M, "[link] [msg]")
else
switch(M.lingcheck())
if(3)
M << msg
to_chat(M, msg)
if(2)
M << msg
to_chat(M, msg)
if(1)
if(prob(40))
M << "<i><font color=#800080>We can faintly sense an outsider trying to communicate through the hivemind...</font></i>"
to_chat(M, "<i><font color=#800080>We can faintly sense an outsider trying to communicate through the hivemind...</font></i>")
if(2)
var/msg = "<i><font color=#800080><b>[mind.changeling.changelingID]:</b> [message]</font></i>"
log_say("[mind.changeling.changelingID]/[src.key] : [message]")
for(var/mob/M in mob_list)
if(M in dead_mob_list)
var/link = FOLLOW_LINK(M, src)
M << "[link] [msg]"
to_chat(M, "[link] [msg]")
else
switch(M.lingcheck())
if(3)
M << msg
to_chat(M, msg)
if(2)
M << msg
to_chat(M, msg)
if(1)
if(prob(40))
M << "<i><font color=#800080>We can faintly sense another of our kind trying to communicate through the hivemind...</font></i>"
to_chat(M, "<i><font color=#800080>We can faintly sense another of our kind trying to communicate through the hivemind...</font></i>")
if(1)
src << "<i><font color=#800080>Our senses have not evolved enough to be able to communicate this way...</font></i>"
to_chat(src, "<i><font color=#800080>Our senses have not evolved enough to be able to communicate this way...</font></i>")
return TRUE
if(message_mode == MODE_ALIEN)
if(hivecheck())
+48 -47
View File
@@ -85,7 +85,7 @@ var/list/ai_list = list()
var/obj/structure/AIcore/deactivated/linked_core //For exosuit control
/mob/living/silicon/ai/New(loc, datum/ai_laws/L, mob/target_ai)
/mob/living/silicon/ai/Initialize(mapload, datum/ai_laws/L, mob/target_ai)
..()
if(!target_ai) //If there is no player/brain inside.
new/obj/structure/AIcore/deactivated(loc) //New empty terminal.
@@ -102,18 +102,18 @@ var/list/ai_list = list()
target_ai.mind.transfer_to(src)
if(mind.special_role)
mind.store_memory("As an AI, you must obey your silicon laws above all else. Your objectives will consider you to be dead.")
src << "<span class='userdanger'>You have been installed as an AI! </span>"
src << "<span class='danger'>You must obey your silicon laws above all else. Your objectives will consider you to be dead.</span>"
to_chat(src, "<span class='userdanger'>You have been installed as an AI! </span>")
to_chat(src, "<span class='danger'>You must obey your silicon laws above all else. Your objectives will consider you to be dead.</span>")
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
src << "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>"
src << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
src << "To use something, simply click on it."
src << "Use say :b to speak to your cyborgs through binary."
src << "For department channels, use the following say commands:"
src << ":o - AI Private, :c - Command, :s - Security, :e - Engineering, :u - Supply, :v - Service, :m - Medical, :n - Science."
to_chat(src, "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>")
to_chat(src, "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>")
to_chat(src, "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>")
to_chat(src, "To use something, simply click on it.")
to_chat(src, "Use say :b to speak to your cyborgs through binary.")
to_chat(src, "For department channels, use the following say commands:")
to_chat(src, ":o - AI Private, :c - Command, :s - Security, :e - Engineering, :u - Supply, :v - Service, :m - Medical, :n - Science.")
show_laws()
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
to_chat(src, "<b>These laws may be changed by other players, or by you being the traitor.</b>")
job = "AI"
@@ -305,7 +305,7 @@ var/list/ai_list = list()
if(isAI(usr))
var/mob/living/silicon/ai/AI = src
if(AI.control_disabled)
usr << "Wireless control is disabled!"
to_chat(usr, "Wireless control is disabled!")
return
var/reason = input(src, "What is the nature of your emergency? ([CALL_SHUTTLE_REASON_LENGTH] characters required.)", "Confirm Shuttle Call") as null|text
@@ -331,7 +331,7 @@ var/list/ai_list = list()
return //won't work if dead
anchored = !anchored // Toggles the anchor
src << "<b>You are now [anchored ? "" : "un"]anchored.</b>"
to_chat(src, "<b>You are now [anchored ? "" : "un"]anchored.</b>")
// the message in the [] will change depending whether or not the AI is anchored
/mob/living/silicon/ai/update_canmove() //If the AI dies, mobs won't go through it anymore
@@ -381,7 +381,7 @@ var/list/ai_list = list()
if(H)
H.attack_ai(src) //may as well recycle
else
src << "<span class='notice'>Unable to locate the holopad.</span>"
to_chat(src, "<span class='notice'>Unable to locate the holopad.</span>")
if(href_list["track"])
var/string = href_list["track"]
trackable_mobs()
@@ -397,17 +397,17 @@ var/list/ai_list = list()
if(target.len)
ai_actual_track(pick(target))
else
src << "Target is not on or near any active cameras on the station."
to_chat(src, "Target is not on or near any active cameras on the station.")
return
if(href_list["callbot"]) //Command a bot to move to a selected location.
if(call_bot_cooldown > world.time)
src << "<span class='danger'>Error: Your last call bot command is still processing, please wait for the bot to finish calculating a route.</span>"
to_chat(src, "<span class='danger'>Error: Your last call bot command is still processing, please wait for the bot to finish calculating a route.</span>")
return
Bot = locate(href_list["callbot"]) in living_mob_list
if(!Bot || Bot.remote_disabled || src.control_disabled)
return //True if there is no bot found, the bot is manually emagged, or the AI is carded with wireless off.
waypoint_mode = 1
src << "<span class='notice'>Set your waypoint by clicking on a valid location free of obstructions.</span>"
to_chat(src, "<span class='notice'>Set your waypoint by clicking on a valid location free of obstructions.</span>")
return
if(href_list["interface"]) //Remotely connect to a bot!
Bot = locate(href_list["interface"]) in living_mob_list
@@ -421,16 +421,16 @@ var/list/ai_list = list()
if (href_list["ai_take_control"]) //Mech domination
var/obj/mecha/M = locate(href_list["ai_take_control"])
if(controlled_mech)
src << "<span class='warning'>You are already loaded into an onboard computer!</span>"
to_chat(src, "<span class='warning'>You are already loaded into an onboard computer!</span>")
return
if(!cameranet.checkCameraVis(M))
src << "<span class='warning'>Exosuit is no longer near active cameras.</span>"
to_chat(src, "<span class='warning'>Exosuit is no longer near active cameras.</span>")
return
if(lacks_power())
src << "<span class='warning'>You're depowered!</span>"
to_chat(src, "<span class='warning'>You're depowered!</span>")
return
if(!isturf(loc))
src << "<span class='warning'>You aren't in your core!</span>"
to_chat(src, "<span class='warning'>You aren't in your core!</span>")
return
if(M)
M.transfer_ai(AI_MECH_HACK,src, usr) //Called om the mech itself.
@@ -461,7 +461,7 @@ var/list/ai_list = list()
return //won't work if dead
if(control_disabled)
src << "Wireless communication is disabled."
to_chat(src, "Wireless communication is disabled.")
return
var/turf/ai_current_turf = get_turf(src)
var/ai_Zlevel = ai_current_turf.z
@@ -495,7 +495,7 @@ var/list/ai_list = list()
else if(cameranet && cameranet.checkTurfVis(turf_check))
call_bot(turf_check)
else
src << "<span class='danger'>Selected location is not visible.</span>"
to_chat(src, "<span class='danger'>Selected location is not visible.</span>")
/mob/living/silicon/ai/proc/call_bot(turf/waypoint)
@@ -503,9 +503,9 @@ var/list/ai_list = list()
return
if(Bot.calling_ai && Bot.calling_ai != src) //Prevents an override if another AI is controlling this bot.
src << "<span class='danger'>Interface error. Unit is already in use.</span>"
to_chat(src, "<span class='danger'>Interface error. Unit is already in use.</span>")
return
src << "<span class='notice'>Sending command to bot...</span>"
to_chat(src, "<span class='notice'>Sending command to bot...</span>")
call_bot_cooldown = world.time + CALL_BOT_COOLDOWN
Bot.call_bot(src, waypoint)
call_bot_cooldown = 0
@@ -607,7 +607,7 @@ var/list/ai_list = list()
if(network in C.network)
U.eyeobj.setLoc(get_turf(C))
break
src << "<span class='notice'>Switched to [network] camera network.</span>"
to_chat(src, "<span class='notice'>Switched to [network] camera network.</span>")
//End of code by Mord_Sith
@@ -697,14 +697,18 @@ var/list/ai_list = list()
var/list/icon_list = list(
"default" = 'icons/mob/AI.dmi',
"floating face" = 'icons/mob/AI.dmi',
"xeno queen" = 'icons/mob/AI.dmi',
"xeno queen" = 'icons/mob/alien.dmi',
"horror" = 'icons/mob/AI.dmi'
)
input = input("Please select a hologram:") as null|anything in icon_list
if(input)
qdel(holo_icon)
holo_icon = getHologramIcon(icon(icon_list[input], input))
switch(input)
if("xeno queen")
holo_icon = getHologramIcon(icon(icon_list[input],"alienq"))
else
holo_icon = getHologramIcon(icon(icon_list[input], input))
return
/mob/living/silicon/ai/proc/corereturn()
@@ -713,7 +717,7 @@ var/list/ai_list = list()
var/obj/machinery/power/apc/apc = src.loc
if(!istype(apc))
src << "<span class='notice'>You are already in your Main Core.</span>"
to_chat(src, "<span class='notice'>You are already in your Main Core.</span>")
return
apc.malfvacate()
@@ -724,17 +728,17 @@ var/list/ai_list = list()
camera_light_on = !camera_light_on
if (!camera_light_on)
src << "Camera lights deactivated."
to_chat(src, "Camera lights deactivated.")
for (var/obj/machinery/camera/C in lit_cameras)
C.SetLuminosity(0)
C.set_light(0)
lit_cameras = list()
return
light_cameras()
src << "Camera lights activated."
to_chat(src, "Camera lights activated.")
//AI_CAMERA_LUMINOSITY
@@ -766,7 +770,7 @@ var/list/ai_list = list()
if(stat == 2)
return //won't work if dead
src << "Accessing Subspace Transceiver control..."
to_chat(src, "Accessing Subspace Transceiver control...")
if (radio)
radio.interact(src)
@@ -788,10 +792,10 @@ var/list/ai_list = list()
return
if(interaction == AI_TRANS_TO_CARD)//The only possible interaction. Upload AI mob to a card.
if(!mind)
user << "<span class='warning'>No intelligence patterns detected.</span>" //No more magical carding of empty cores, AI RETURN TO BODY!!!11
to_chat(user, "<span class='warning'>No intelligence patterns detected.</span>" )
return
if(!can_be_carded)
user << "<span class='boldwarning'>Transfer failed.</span>"
to_chat(user, "<span class='boldwarning'>Transfer failed.</span>")
return
ShutOffDoomsdayDevice()
new /obj/structure/AIcore/deactivated(loc)//Spawns a deactivated terminal at AI location.
@@ -800,8 +804,8 @@ var/list/ai_list = list()
radio_enabled = 0 //No talking on the built-in radio for you either!
forceMove(card)
card.AI = src
src << "You have been downloaded to a mobile storage device. Remote device connection severed."
user << "<span class='boldnotice'>Transfer successful</span>: [name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
to_chat(src, "You have been downloaded to a mobile storage device. Remote device connection severed.")
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory.")
/mob/living/silicon/ai/can_buckle()
return 0
@@ -841,8 +845,8 @@ var/list/ai_list = list()
/mob/living/silicon/ai/proc/add_malf_picker()
src << "In the top right corner of the screen you will find the Malfunctions tab, where you can purchase various abilities, from upgraded surveillance to station ending doomsday devices."
src << "You are also capable of hacking APCs, which grants you more points to spend on your Malfunction powers. The drawback is that a hacked APC will give you away if spotted by the crew. Hacking an APC takes 60 seconds."
to_chat(src, "In the top right corner of the screen you will find the Malfunctions tab, where you can purchase various abilities, from upgraded surveillance to station ending doomsday devices.")
to_chat(src, "You are also capable of hacking APCs, which grants you more points to spend on your Malfunction powers. The drawback is that a hacked APC will give you away if spotted by the crew. Hacking an APC takes 60 seconds.")
view_core() //A BYOND bug requires you to be viewing your core before your verbs update
verbs += /mob/living/silicon/ai/proc/choose_modules
malf_picker = new /datum/module_picker
@@ -886,12 +890,10 @@ var/list/ai_list = list()
clear_alert("hackingapc")
if(!istype(apc) || QDELETED(apc) || apc.stat & BROKEN)
src << "<span class='danger'>Hack aborted. The designated APC no \
longer exists on the power network.</span>"
to_chat(src, "<span class='danger'>Hack aborted. The designated APC no longer exists on the power network.</span>")
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1)
else if(apc.aidisabled)
src << "<span class='danger'>Hack aborted. \The [apc] is no \
longer responding to our systems.</span>"
to_chat(src, "<span class='danger'>Hack aborted. \The [apc] is no longer responding to our systems.</span>")
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 1)
else
malf_picker.processing_time += 10
@@ -902,14 +904,13 @@ var/list/ai_list = list()
apc.coverlocked = TRUE
playsound(get_turf(src), 'sound/machines/ding.ogg', 50, 1)
src << "Hack complete. \The [apc] is now under your \
exclusive control."
to_chat(src, "Hack complete. \The [apc] is now under your exclusive control.")
apc.update_icon()
/mob/living/silicon/ai/resist()
return
/mob/living/silicon/ai/spawned/New(loc, datum/ai_laws/L, mob/target_ai)
/mob/living/silicon/ai/spawned/Initialize(mapload, datum/ai_laws/L, mob/target_ai)
if(!target_ai)
target_ai = src //cheat! just give... ourselves as the spawned AI, because that's technically correct
..()
..()
@@ -7,7 +7,7 @@
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M)
if(!ticker || !ticker.mode)
M << "You cannot attack people before the game has started."
to_chat(M, "You cannot attack people before the game has started.")
return
..()
@@ -19,6 +19,6 @@
msg += "[src]Core.exe has stopped responding! NTOS is searching for a solution to the problem...\n"
msg += "*---------*</span>"
user << msg
to_chat(user, msg)
..()
@@ -115,7 +115,7 @@ var/datum/cameranet/cameranet = new()
var/x2 = min(world.maxx, T.x + (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
var/y2 = min(world.maxy, T.y + (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
//world << "X1: [x1] - Y1: [y1] - X2: [x2] - Y2: [y2]"
//to_chat(world, "X1: [x1] - Y1: [y1] - X2: [x2] - Y2: [y2]")
for(var/x = x1; x <= x2; x += CHUNK_SIZE)
for(var/y = y1; y <= y2; y += CHUNK_SIZE)
@@ -149,7 +149,7 @@ var/datum/cameranet/cameranet = new()
/datum/cameranet/proc/stat_entry()
if(!statclick)
statclick = new/obj/effect/statclick/debug("Initializing...", src)
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
stat(name, statclick.update("Cameras: [cameranet.cameras.len] | Chunks: [cameranet.chunks.len]"))
@@ -88,7 +88,7 @@
unset_machine()
if(!eyeobj || !eyeobj.loc || QDELETED(eyeobj))
src << "ERROR: Eyeobj not found. Creating new eye..."
to_chat(src, "ERROR: Eyeobj not found. Creating new eye...")
eyeobj = new(loc)
eyeobj.ai = src
eyeobj.name = "[src.name] (AI Eye)" // Give it a name
@@ -102,7 +102,7 @@
if(usr.stat == 2)
return //won't work if dead
acceleration = !acceleration
usr << "Camera acceleration has been toggled [acceleration ? "on" : "off"]."
to_chat(usr, "Camera acceleration has been toggled [acceleration ? "on" : "off"].")
/mob/camera/aiEye/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans)
if(relay_speech && speaker && ai && !radio_freq && speaker != ai && near_camera(speaker))
+1 -1
View File
@@ -13,7 +13,7 @@
who = world
else
who = src
who << "<b>Obey these laws:</b>"
to_chat(who, "<b>Obey these laws:</b>")
src.laws_sanity_check()
src.laws.show_laws(who)
+15 -15
View File
@@ -93,7 +93,7 @@
/mob/living/silicon/ai/proc/start_RestorePowerRoutine()
src << "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection."
to_chat(src, "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection.")
sleep(50)
var/turf/T = get_turf(src)
var/area/AIarea = get_area(src)
@@ -101,16 +101,16 @@
if(!isspaceturf(T))
ai_restore_power()
return
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
to_chat(src, "Fault confirmed: missing external power. Shutting down main control system to save power.")
sleep(20)
src << "Emergency control system online. Verifying connection to power network."
to_chat(src, "Emergency control system online. Verifying connection to power network.")
sleep(50)
T = get_turf(src)
if(isspaceturf(T))
src << "Unable to verify! No power connection detected!"
to_chat(src, "Unable to verify! No power connection detected!")
aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC
return
src << "Connection verified. Searching for APC in power network."
to_chat(src, "Connection verified. Searching for APC in power network.")
sleep(50)
var/obj/machinery/power/apc/theAPC = null
@@ -127,9 +127,9 @@
if (!theAPC)
switch(PRP)
if(1)
src << "Unable to locate APC!"
to_chat(src, "Unable to locate APC!")
else
src << "Lost connection with the APC!"
to_chat(src, "Lost connection with the APC!")
aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC
return
if(AIarea.power_equip)
@@ -137,13 +137,13 @@
ai_restore_power()
return
switch(PRP)
if (1) src << "APC located. Optimizing route to APC to avoid needless power waste."
if (2) src << "Best route identified. Hacking offline APC power port."
if (3) src << "Power port upload access confirmed. Loading control program into APC power port software."
if (1) to_chat(src, "APC located. Optimizing route to APC to avoid needless power waste.")
if (2) to_chat(src, "Best route identified. Hacking offline APC power port.")
if (3) to_chat(src, "Power port upload access confirmed. Loading control program into APC power port software.")
if (4)
src << "Transfer complete. Forcing APC to execute program."
to_chat(src, "Transfer complete. Forcing APC to execute program.")
sleep(50)
src << "Receiving control information from APC."
to_chat(src, "Receiving control information from APC.")
sleep(2)
apc_override = 1
theAPC.ui_interact(src, state = conscious_state)
@@ -155,9 +155,9 @@
/mob/living/silicon/ai/proc/ai_restore_power()
if(aiRestorePowerRoutine)
if(aiRestorePowerRoutine == POWER_RESTORATION_APC_FOUND)
src << "Alert cancelled. Power has been restored."
to_chat(src, "Alert cancelled. Power has been restored.")
else
src << "Alert cancelled. Power has been restored without our assistance."
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
aiRestorePowerRoutine = POWER_RESTORATION_OFF
set_blindness(0)
update_sight()
@@ -166,7 +166,7 @@
aiRestorePowerRoutine = POWER_RESTORATION_START
blind_eyes(1)
update_sight()
src << "You've lost power!"
to_chat(src, "You've lost power!")
addtimer(CALLBACK(src, .proc/start_RestorePowerRoutine), 20)
#undef POWER_RESTORATION_OFF
+7 -7
View File
@@ -19,7 +19,7 @@
/mob/living/silicon/ai/radio(message, message_mode, list/spans)
if(!radio_enabled || aiRestorePowerRoutine || stat) //AI cannot speak if radio is disabled (via intellicard) or depowered.
src << "<span class='danger'>Your radio transmitter is offline!</span>"
to_chat(src, "<span class='danger'>Your radio transmitter is offline!</span>")
return 0
..()
@@ -50,9 +50,9 @@
var/obj/machinery/holopad/T = current
if(istype(T) && T.masters[src])//If there is a hologram and its master is the user.
send_speech(message, 7, T, "robot", get_spans())
src << "<i><span class='game say'>Holopad transmitted, <span class='name'>[real_name]</span> <span class='message robot'>\"[message]\"</span></span></i>"//The AI can "hear" its own message.
to_chat(src, "<i><span class='game say'>Holopad transmitted, <span class='name'>[real_name]</span> <span class='message robot'>\"[message]\"</span></span></i>")
else
src << "No holopad connected."
to_chat(src, "No holopad connected.")
return
@@ -92,7 +92,7 @@ var/const/VOX_DELAY = 600
/mob/living/silicon/ai/proc/announcement()
if(announcing_vox > world.time)
src << "<span class='notice'>Please wait [round((announcing_vox - world.time) / 10)] seconds.</span>"
to_chat(src, "<span class='notice'>Please wait [round((announcing_vox - world.time) / 10)] seconds.</span>")
return
var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement) as text
@@ -106,7 +106,7 @@ var/const/VOX_DELAY = 600
return
if(control_disabled)
src << "<span class='notice'>Wireless interface disabled, unable to interact with announcement PA.</span>"
to_chat(src, "<span class='notice'>Wireless interface disabled, unable to interact with announcement PA.</span>")
return
var/list/words = splittext(trim(message), " ")
@@ -124,7 +124,7 @@ var/const/VOX_DELAY = 600
incorrect_words += word
if(incorrect_words.len)
src << "<span class='notice'>These words are not available on the announcement system: [english_list(incorrect_words)].</span>"
to_chat(src, "<span class='notice'>These words are not available on the announcement system: [english_list(incorrect_words)].</span>")
return
announcing_vox = world.time + VOX_DELAY
@@ -139,7 +139,7 @@ var/const/VOX_DELAY = 600
var/turf/T = get_turf(M)
var/turf/our_turf = get_turf(src)
if(T.z == our_turf.z)
M << "<b><font size = 3><font color = red>AI announcement:</font color> [message]</font size></b>"
to_chat(M, "<b><font size = 3><font color = red>AI announcement:</font color> [message]</font size></b>")
*/
+1 -1
View File
@@ -1,4 +1,4 @@
/mob/living/silicon/examine(mob/user) //Displays a silicon's laws to ghosts
if(laws && isobserver(user))
user << "<b>[src] has the following laws:</b>"
to_chat(user, "<b>[src] has the following laws:</b>")
laws.show_laws(user)
+1 -1
View File
@@ -8,7 +8,7 @@
/mob/living/silicon/proc/post_lawchange(announce = TRUE)
throw_alert("newlaw", /obj/screen/alert/newlaw)
if(announce && last_lawchange_announce != world.time)
src << "<b>Your laws have been changed.</b>"
to_chat(src, "<b>Your laws have been changed.</b>")
addtimer(CALLBACK(src, .proc/show_laws), 0)
last_lawchange_announce = world.time
+5 -4
View File
@@ -55,7 +55,7 @@
var/canholo = TRUE
var/obj/item/weapon/card/id/access_card = null
var/chassis = "repairbot"
var/list/possible_chassis = list("cat", "mouse", "monkey", "corgi", "fox", "repairbot", "rabbit", "wolf")
var/list/possible_chassis = list("cat", "mouse", "monkey", "corgi", "fox", "repairbot", "rabbit")
var/emitterhealth = 20
var/emittermaxhealth = 20
@@ -70,7 +70,7 @@
canmove = FALSE
var/silent = 0
var/hit_slowdown = 0
var/light_power = 5
var/brightness_power = 5
var/slowdown = 0
/mob/living/silicon/pai/movement_delay()
@@ -81,7 +81,8 @@
pai_list -= src
..()
/mob/living/silicon/pai/New(var/obj/item/device/paicard/P)
/mob/living/silicon/pai/Initialize()
var/obj/item/device/paicard/P = loc
START_PROCESSING(SSfastprocess, src)
pai_list += src
make_laws()
@@ -212,7 +213,7 @@
/mob/living/silicon/pai/examine(mob/user)
..()
user << "A personal AI in holochassis mode. Its master ID string seems to be [master]."
to_chat(user, "A personal AI in holochassis mode. Its master ID string seems to be [master].")
/mob/living/silicon/pai/Life()
if(stat == DEAD)
@@ -48,10 +48,10 @@
. = ..(Proj)
/mob/living/silicon/pai/stripPanelUnequip(obj/item/what, mob/who, where) //prevents stripping
src << "<span class='warning'>Your holochassis stutters and warps intensely as you attempt to interact with the object, forcing you to cease lest the field fail.</span>"
to_chat(src, "<span class='warning'>Your holochassis stutters and warps intensely as you attempt to interact with the object, forcing you to cease lest the field fail.</span>")
/mob/living/silicon/pai/stripPanelEquip(obj/item/what, mob/who, where) //prevents stripping
src << "<span class='warning'>Your holochassis stutters and warps intensely as you attempt to interact with the object, forcing you to cease lest the field fail.</span>"
to_chat(src, "<span class='warning'>Your holochassis stutters and warps intensely as you attempt to interact with the object, forcing you to cease lest the field fail.</span>")
/mob/living/silicon/pai/IgniteMob(var/mob/living/silicon/pai/P)
return FALSE //No we're not flammable
@@ -60,7 +60,7 @@
emitterhealth = Clamp((emitterhealth - amount), -50, emittermaxhealth)
if(emitterhealth < 0)
fold_in(force = TRUE)
src << "<span class='userdanger'>The impact degrades your holochassis!</span>"
to_chat(src, "<span class='userdanger'>The impact degrades your holochassis!</span>")
hit_slowdown += amount
return amount
@@ -1,11 +1,11 @@
/mob/living/silicon/pai/proc/fold_out(force = FALSE)
if(emitterhealth < 0)
src << "<span class='warning'>Your holochassis emitters are still too unstable! Please wait for automatic repair.</span>"
to_chat(src, "<span class='warning'>Your holochassis emitters are still too unstable! Please wait for automatic repair.</span>")
return FALSE
if(!canholo && !force)
src << "<span class='warning'>Your master or another force has disabled your holochassis emitters!</span>"
to_chat(src, "<span class='warning'>Your master or another force has disabled your holochassis emitters!</span>")
return FALSE
if(holoform)
@@ -13,7 +13,7 @@
return
if(emittersemicd)
src << "<span class='warning'>Error: Holochassis emitters recycling. Please try again later.</span>"
to_chat(src, "<span class='warning'>Error: Holochassis emitters recycling. Please try again later.</span>")
return FALSE
emittersemicd = TRUE
@@ -27,14 +27,14 @@
if(istype(card.loc, /mob/living))
var/mob/living/L = card.loc
if(!L.temporarilyRemoveItemFromInventory(card))
src << "<span class='warning'>Error: Unable to expand to mobile form. Chassis is restrained by some device or person.</span>"
to_chat(src, "<span class='warning'>Error: Unable to expand to mobile form. Chassis is restrained by some device or person.</span>")
return FALSE
forceMove(get_turf(card))
card.forceMove(src)
if(client)
client.perspective = EYE_PERSPECTIVE
client.eye = src
SetLuminosity(0)
set_light(0)
icon_state = "[chassis]"
visible_message("<span class='boldnotice'>[src] folds out its holochassis emitter and forms a holoshell around itself!</span>")
holoform = TRUE
@@ -62,7 +62,7 @@
forceMove(card)
canmove = FALSE
density = FALSE
SetLuminosity(0)
set_light(0)
holoform = FALSE
if(resting)
lay_down()
@@ -75,7 +75,7 @@
icon_state = "[chassis]"
if(resting)
icon_state = "[chassis]_rest"
src << "<span class='boldnotice'>You switch your holochassis projection composite to [chassis]</span>"
to_chat(src, "<span class='boldnotice'>You switch your holochassis projection composite to [chassis]</span>")
/mob/living/silicon/pai/lay_down()
..()
@@ -94,11 +94,11 @@
/mob/living/silicon/pai/proc/toggle_integrated_light()
if(!luminosity)
SetLuminosity(light_power)
src << "<span class='notice'>You enable your integrated light.</span>"
set_light(brightness_power)
to_chat(src, "<span class='notice'>You enable your integrated light.</span>")
else
SetLuminosity(0)
src << "<span class='notice'>You disable your integrated light.</span>"
set_light(0)
to_chat(src, "<span class='notice'>You disable your integrated light.</span>")
/mob/living/silicon/pai/movement_delay()
. = ..()
+1 -1
View File
@@ -1,6 +1,6 @@
/mob/living/silicon/pai/say(msg)
if(silent)
src << "<span class='warning'>Communication circuits remain unitialized.</span>"
to_chat(src, "<span class='warning'>Communication circuits remain unitialized.</span>")
else
..(msg)
@@ -200,7 +200,7 @@
M = M.loc
count++
if(count >= 6)
src << "You are not being carried by anyone!"
to_chat(src, "You are not being carried by anyone!")
return 0
spawn CheckDNA(M, src)
@@ -376,15 +376,15 @@
"<span class='notice'>You press your thumb against [P].</span>",\
"<span class='notice'>[P] makes a sharp clicking sound as it extracts DNA material from [M].</span>")
if(!M.has_dna())
P << "<b>No DNA detected</b>"
to_chat(P, "<b>No DNA detected</b>")
return
P << "<font color = red><h3>[M]'s UE string : [M.dna.unique_enzymes]</h3></font>"
to_chat(P, "<font color = red><h3>[M]'s UE string : [M.dna.unique_enzymes]</h3></font>")
if(M.dna.unique_enzymes == P.master_dna)
P << "<b>DNA is a match to stored Master DNA.</b>"
to_chat(P, "<b>DNA is a match to stored Master DNA.</b>")
else
P << "<b>DNA does not match stored Master DNA.</b>"
to_chat(P, "<b>DNA does not match stored Master DNA.</b>")
else
P << "[M] does not seem like [M.p_they()] [M.p_are()] going to provide a DNA sample willingly."
to_chat(P, "[M] does not seem like [M.p_they()] [M.p_are()] going to provide a DNA sample willingly.")
// -=-=-=-= Software =-=-=-=-=- //
@@ -565,7 +565,7 @@
dat += "<font color=#55FF55>Connected</font> <br>"
if(!istype(machine, /obj/machinery/camera))
src << "DERP"
to_chat(src, "DERP")
return dat
// Door Jack
@@ -601,9 +601,9 @@
var/turf/T = get_turf(src.loc)
for(var/mob/living/silicon/ai/AI in player_list)
if(T.loc)
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [T.loc].</b></font>"
to_chat(AI, "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [T.loc].</b></font>")
else
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress. Unable to pinpoint location.</b></font>"
to_chat(AI, "<font color = red><b>Network Alert: Brute-force encryption crack in progress. Unable to pinpoint location.</b></font>")
while(src.hackprogress < 100)
if(src.cable && src.cable.machine && istype(src.cable.machine, /obj/machinery/door) && src.cable.machine == src.hackdoor && get_dist(src, src.hackdoor) <= 1)
hackprogress += rand(1, 10)
@@ -69,4 +69,4 @@
"You announce you are operating in low power mode.")
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
else
src << "<span class='warning'>You can only use this emote when you're out of charge.</span>"
to_chat(src, "<span class='warning'>You can only use this emote when you're out of charge.</span>")
@@ -46,6 +46,6 @@
msg += "<span class='deadsay'>It looks like its system is corrupted and requires a reset.</span>\n"
msg += "*---------*</span>"
user << msg
to_chat(user, msg)
..()
@@ -48,7 +48,7 @@
if(!(O in module.modules))
return
if(activated(O))
src << "<span class='warning'>That module is already activated.</span>"
to_chat(src, "<span class='warning'>That module is already activated.</span>")
return
if(!held_items[1])
held_items[1] = O
@@ -63,7 +63,7 @@
O.screen_loc = inv3.screen_loc
. = TRUE
else
src << "<span class='warning'>You need to disable a module first!</span>"
to_chat(src, "<span class='warning'>You need to disable a module first!</span>")
if(.)
O.equipped(src, slot_hands)
O.mouse_opacity = initial(O.mouse_opacity)
+10 -10
View File
@@ -17,29 +17,29 @@
if(lawupdate)
if (connected_ai)
if(connected_ai.stat || connected_ai.control_disabled)
src << "<b>AI signal lost, unable to sync laws.</b>"
to_chat(src, "<b>AI signal lost, unable to sync laws.</b>")
else
lawsync()
src << "<b>Laws synced with AI, be sure to note any changes.</b>"
to_chat(src, "<b>Laws synced with AI, be sure to note any changes.</b>")
if(is_special_character(src))
src << "<b>Remember, your AI does NOT share or know about your law 0.</b>"
to_chat(src, "<b>Remember, your AI does NOT share or know about your law 0.</b>")
if(src.connected_ai.laws.zeroth)
src << "<b>While you are free to disregard it, your AI has a law 0 of its own.</b>"
to_chat(src, "<b>While you are free to disregard it, your AI has a law 0 of its own.</b>")
else
src << "<b>No AI selected to sync laws with, disabling lawsync protocol.</b>"
to_chat(src, "<b>No AI selected to sync laws with, disabling lawsync protocol.</b>")
lawupdate = 0
who << "<b>Obey these laws:</b>"
to_chat(who, "<b>Obey these laws:</b>")
laws.show_laws(who)
if (is_special_character(src) && connected_ai)
who << "<b>Remember, [connected_ai.name] is technically your master, but your objective comes first.</b>"
to_chat(who, "<b>Remember, [connected_ai.name] is technically your master, but your objective comes first.</b>")
else if (connected_ai)
who << "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>"
to_chat(who, "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>")
else if (emagged)
who << "<b>Remember, you are not required to listen to the AI.</b>"
to_chat(who, "<b>Remember, you are not required to listen to the AI.</b>")
else
who << "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>"
to_chat(who, "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>")
/mob/living/silicon/robot/proc/lawsync()
+75 -68
View File
@@ -93,7 +93,7 @@
buckle_lying = FALSE
can_ride_typecache = list(/mob/living/carbon/human)
/mob/living/silicon/robot/New(loc)
/mob/living/silicon/robot/Initialize(mapload)
spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -114,13 +114,8 @@
if(lawupdate)
make_laws()
connected_ai = select_active_ai_with_fewest_borgs()
if(connected_ai)
connected_ai.connected_robots += src
lawsync()
lawupdate = 1
else
lawupdate = 0
if(!TryConnectToAI())
lawupdate = FALSE
radio = new /obj/item/device/radio/borg(src)
if(!scrambledcodes && !camera)
@@ -169,10 +164,9 @@
mind.transfer_to(mmi.brainmob)
mmi.update_icon()
else
src << "<span class='boldannounce'>Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug.</span>"
to_chat(src, "<span class='boldannounce'>Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug.</span>")
ghostize()
spawn(0)
throw EXCEPTION("Borg MMI lacked a brainmob")
stack_trace("Borg MMI lacked a brainmob")
mmi = null
if(connected_ai)
connected_ai.connected_robots -= src
@@ -230,7 +224,7 @@
set category = "Robot Commands"
set name = "Show Alerts"
if(usr.stat == DEAD)
src << "<span class='userdanger'>Alert: You are dead.</span>"
to_chat(src, "<span class='userdanger'>Alert: You are dead.</span>")
return //won't work if dead
robot_alerts()
@@ -278,7 +272,7 @@
/mob/living/silicon/robot/proc/toggle_ionpulse()
if(!ionpulse)
src << "<span class='notice'>No thrusters are installed!</span>"
to_chat(src, "<span class='notice'>No thrusters are installed!</span>")
return
if(!ion_trail)
@@ -286,7 +280,7 @@
ion_trail.set_up(src)
ionpulse_on = !ionpulse_on
src << "<span class='notice'>You [ionpulse_on ? null :"de"]activate your ion thrusters.</span>"
to_chat(src, "<span class='notice'>You [ionpulse_on ? null :"de"]activate your ion thrusters.</span>")
if(ionpulse_on)
ion_trail.start()
else
@@ -357,11 +351,11 @@
user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/weapon/weldingtool/WT = W
if (!getBruteLoss())
user << "<span class='warning'>[src] is already in good condition!</span>"
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
return
if (WT.remove_fuel(0, user)) //The welder has 1u of fuel consumed by it's afterattack, so we don't need to worry about taking any away.
if(src == user)
user << "<span class='notice'>You start fixing yourself...</span>"
to_chat(user, "<span class='notice'>You start fixing yourself...</span>")
if(!do_after(user, 50, target = src))
return
@@ -371,7 +365,7 @@
visible_message("<span class='notice'>[user] has fixed some of the dents on [src].</span>")
return
else
user << "<span class='warning'>The welder must be on for this task!</span>"
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
return
else if(istype(W, /obj/item/stack/cable_coil) && wiresexposed)
@@ -379,7 +373,7 @@
var/obj/item/stack/cable_coil/coil = W
if (getFireLoss() > 0)
if(src == user)
user << "<span class='notice'>You start fixing yourself...</span>"
to_chat(user, "<span class='notice'>You start fixing yourself...</span>")
if(!do_after(user, 50, target = src))
return
if (coil.use(1))
@@ -387,34 +381,34 @@
updatehealth()
user.visible_message("[user] has fixed some of the burnt wires on [src].", "<span class='notice'>You fix some of the burnt wires on [src].</span>")
else
user << "<span class='warning'>You need more cable to repair [src]!</span>"
to_chat(user, "<span class='warning'>You need more cable to repair [src]!</span>")
else
user << "The wires seem fine, there's no need to fix them."
to_chat(user, "The wires seem fine, there's no need to fix them.")
else if(istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover
if(opened)
user << "<span class='notice'>You close the cover.</span>"
to_chat(user, "<span class='notice'>You close the cover.</span>")
opened = 0
update_icons()
else
if(locked)
user << "<span class='warning'>The cover is locked and cannot be opened!</span>"
to_chat(user, "<span class='warning'>The cover is locked and cannot be opened!</span>")
else
user << "<span class='notice'>You open the cover.</span>"
to_chat(user, "<span class='notice'>You open the cover.</span>")
opened = 1
update_icons()
else if(istype(W, /obj/item/weapon/stock_parts/cell) && opened) // trying to put a cell inside
if(wiresexposed)
user << "<span class='warning'>Close the cover first!</span>"
to_chat(user, "<span class='warning'>Close the cover first!</span>")
else if(cell)
user << "<span class='warning'>There is a power cell already installed!</span>"
to_chat(user, "<span class='warning'>There is a power cell already installed!</span>")
else
if(!user.drop_item())
return
W.loc = src
cell = W
user << "<span class='notice'>You insert the power cell.</span>"
to_chat(user, "<span class='notice'>You insert the power cell.</span>")
update_icons()
diag_hud_set_borgcell()
@@ -422,28 +416,28 @@
if (wiresexposed)
wires.interact(user)
else
user << "<span class='warning'>You can't reach the wiring!</span>"
to_chat(user, "<span class='warning'>You can't reach the wiring!</span>")
else if(istype(W, /obj/item/weapon/screwdriver) && opened && !cell) // haxing
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
update_icons()
else if(istype(W, /obj/item/weapon/screwdriver) && opened && cell) // radio
if(radio)
radio.attackby(W,user)//Push it to the radio to let it handle everything
else
user << "<span class='warning'>Unable to locate a radio!</span>"
to_chat(user, "<span class='warning'>Unable to locate a radio!</span>")
update_icons()
else if(istype(W, /obj/item/weapon/wrench) && opened && !cell) //Deconstruction. The flashes break from the fall, to prevent this from being a ghetto reset module.
if(!lockcharge)
user << "<span class='boldannounce'>[src]'s bolts spark! Maybe you should lock them down first!</span>"
to_chat(user, "<span class='boldannounce'>[src]'s bolts spark! Maybe you should lock them down first!</span>")
spark_system.start()
return
else
playsound(src, W.usesound, 50, 1)
user << "<span class='notice'>You start to unfasten [src]'s securing bolts...</span>"
to_chat(user, "<span class='notice'>You start to unfasten [src]'s securing bolts...</span>")
if(do_after(user, 50*W.toolspeed, target = src) && !cell)
user.visible_message("[user] deconstructs [src]!", "<span class='notice'>You unfasten the securing bolts, and [src] falls to pieces!</span>")
deconstruct()
@@ -451,19 +445,19 @@
else if(istype(W, /obj/item/weapon/aiModule))
var/obj/item/weapon/aiModule/MOD = W
if(!opened)
user << "<span class='warning'>You need access to the robot's insides to do that!</span>"
to_chat(user, "<span class='warning'>You need access to the robot's insides to do that!</span>")
return
if(wiresexposed)
user << "<span class='warning'>You need to close the wire panel to do that!</span>"
to_chat(user, "<span class='warning'>You need to close the wire panel to do that!</span>")
return
if(!cell)
user << "<span class='warning'>You need to install a power cell to do that!</span>"
to_chat(user, "<span class='warning'>You need to install a power cell to do that!</span>")
return
if(emagged || (connected_ai && lawupdate)) //Can't be sure which, metagamers
emote("buzz-[user.name]")
return
if(!mind) //A player mind is required for law procs to run antag checks.
user << "<span class='warning'>[src] is entirely unresponsive!</span>"
to_chat(user, "<span class='warning'>[src] is entirely unresponsive!</span>")
return
MOD.install(laws, user) //Proc includes a success mesage so we don't need another one
return
@@ -472,51 +466,51 @@
if(radio)//sanityyyyyy
radio.attackby(W,user)//GTFO, you have your own procs
else
user << "<span class='warning'>Unable to locate a radio!</span>"
to_chat(user, "<span class='warning'>Unable to locate a radio!</span>")
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
if(emagged)//still allow them to open the cover
user << "<span class='notice'>The interface seems slightly damaged.</span>"
to_chat(user, "<span class='notice'>The interface seems slightly damaged.</span>")
if(opened)
user << "<span class='warning'>You must close the cover to swipe an ID card!</span>"
to_chat(user, "<span class='warning'>You must close the cover to swipe an ID card!</span>")
else
if(allowed(usr))
locked = !locked
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] [src]'s cover.</span>"
to_chat(user, "<span class='notice'>You [ locked ? "lock" : "unlock"] [src]'s cover.</span>")
update_icons()
else
user << "<span class='danger'>Access denied.</span>"
to_chat(user, "<span class='danger'>Access denied.</span>")
else if(istype(W, /obj/item/borg/upgrade/))
var/obj/item/borg/upgrade/U = W
if(!opened)
user << "<span class='warning'>You must access the borg's internals!</span>"
to_chat(user, "<span class='warning'>You must access the borg's internals!</span>")
else if(!src.module && U.require_module)
user << "<span class='warning'>The borg must choose a module before it can be upgraded!</span>"
to_chat(user, "<span class='warning'>The borg must choose a module before it can be upgraded!</span>")
else if(U.locked)
user << "<span class='warning'>The upgrade is locked and cannot be used yet!</span>"
to_chat(user, "<span class='warning'>The upgrade is locked and cannot be used yet!</span>")
else
if(!user.drop_item())
return
if(U.action(src))
user << "<span class='notice'>You apply the upgrade to [src].</span>"
to_chat(user, "<span class='notice'>You apply the upgrade to [src].</span>")
if(U.one_use)
qdel(U)
else
U.forceMove(src)
upgrades += U
else
user << "<span class='danger'>Upgrade error.</span>"
to_chat(user, "<span class='danger'>Upgrade error.</span>")
else if(istype(W, /obj/item/device/toner))
if(toner >= tonermax)
user << "<span class='warning'>The toner level of [src] is at its highest level possible!</span>"
to_chat(user, "<span class='warning'>The toner level of [src] is at its highest level possible!</span>")
else
if(!user.drop_item())
return
toner = tonermax
qdel(W)
user << "<span class='notice'>You fill the toner level of [src] to its max capacity.</span>"
to_chat(user, "<span class='notice'>You fill the toner level of [src] to its max capacity.</span>")
else
return ..()
@@ -531,7 +525,7 @@
if("Yes")
locked = 0
update_icons()
usr << "<span class='notice'>You unlock your cover.</span>"
to_chat(usr, "<span class='notice'>You unlock your cover.</span>")
/mob/living/silicon/robot/proc/allowed(mob/M)
//check if it doesn't require any access at all
@@ -639,7 +633,7 @@
cleaned_human.update_inv_shoes()
cleaned_human.clean_blood()
cleaned_human.wash_cream()
cleaned_human << "<span class='danger'>[src] cleans your face!</span>"
to_chat(cleaned_human, "<span class='danger'>[src] cleans your face!</span>")
return
if(istype(module, /obj/item/weapon/robot_module/miner))
@@ -684,7 +678,7 @@
if(R)
R.UnlinkSelf()
R << "Buffers flushed and reset. Camera system shutdown. All systems operational."
to_chat(R, "Buffers flushed and reset. Camera system shutdown. All systems operational.")
src.verbs -= /mob/living/silicon/robot/proc/ResetSecurityCodes
/mob/living/silicon/robot/mode()
@@ -738,31 +732,33 @@
/mob/living/silicon/robot/proc/control_headlamp()
if(stat || lamp_recharging || low_power_mode)
src << "<span class='danger'>This function is currently offline.</span>"
to_chat(src, "<span class='danger'>This function is currently offline.</span>")
return
//Some sort of magical "modulo" thing which somehow increments lamp power by 2, until it hits the max and resets to 0.
lamp_intensity = (lamp_intensity+2) % (lamp_max+2)
src << "[lamp_intensity ? "Headlamp power set to Level [lamp_intensity/2]" : "Headlamp disabled."]"
to_chat(src, "[lamp_intensity ? "Headlamp power set to Level [lamp_intensity/2]" : "Headlamp disabled."]")
update_headlamp()
/mob/living/silicon/robot/proc/update_headlamp(var/turn_off = 0, var/cooldown = 100)
SetLuminosity(0)
set_light(0)
if(lamp_intensity && (turn_off || stat || low_power_mode))
src << "<span class='danger'>Your headlamp has been deactivated.</span>"
to_chat(src, "<span class='danger'>Your headlamp has been deactivated.</span>")
lamp_intensity = 0
lamp_recharging = 1
spawn(cooldown) //10 seconds by default, if the source of the deactivation does not keep stat that long.
lamp_recharging = 0
lamp_recharging = TRUE
addtimer(CALLBACK(src, .proc/reset_headlamp), cooldown)
else
AddLuminosity(lamp_intensity)
set_light(lamp_intensity)
if(lamp_button)
lamp_button.icon_state = "lamp[lamp_intensity]"
update_icons()
/mob/living/silicon/robot/proc/reset_headlamp()
lamp_recharging = FALSE
/mob/living/silicon/robot/proc/deconstruct()
var/turf/T = get_turf(src)
if (robot_suit)
@@ -820,16 +816,18 @@
<i>Help the operatives secure the disk at all costs!</i></b>"
var/set_module = /obj/item/weapon/robot_module/syndicate
/mob/living/silicon/robot/syndicate/New(loc)
/mob/living/silicon/robot/syndicate/Initialize()
..()
cell.maxcharge = 25000
cell.charge = 25000
radio = new /obj/item/device/radio/borg/syndicate(src)
module.transform_to(set_module)
laws = new /datum/ai_laws/syndicate_override()
spawn(5)
if(playstyle_string)
src << playstyle_string
addtimer(CALLBACK(src, .proc/show_playstyle), 5)
/mob/living/silicon/robot/syndicate/proc/show_playstyle()
if(playstyle_string)
to_chat(src, playstyle_string)
/mob/living/silicon/robot/syndicate/medical
icon_state = "syndi-medi"
@@ -846,11 +844,11 @@
return
switch(notifytype)
if(1) //New Cyborg
connected_ai << "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <a href='?src=\ref[connected_ai];track=[html_encode(name)]'>[name]</a></span><br>"
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <a href='?src=\ref[connected_ai];track=[html_encode(name)]'>[name]</a></span><br>")
if(2) //New Module
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.</span><br>"
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.</span><br>")
if(3) //New Name
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>"
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>")
/mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close = 0)
if(stat || lockcharge || low_power_mode)
@@ -863,13 +861,13 @@
..()
if(health < maxHealth*0.5) //Gradual break down of modules as more damage is sustained
if(uneq_module(held_items[3]))
src << "<span class='warning'>SYSTEM ERROR: Module 3 OFFLINE.</span>"
to_chat(src, "<span class='warning'>SYSTEM ERROR: Module 3 OFFLINE.</span>")
if(health < 0)
if(uneq_module(held_items[2]))
src << "<span class='warning'>SYSTEM ERROR: Module 2 OFFLINE.</span>"
to_chat(src, "<span class='warning'>SYSTEM ERROR: Module 2 OFFLINE.</span>")
if(health < -maxHealth*0.5)
if(uneq_module(held_items[1]))
src << "<span class='warning'>CRITICAL ERROR: All modules OFFLINE.</span>"
to_chat(src, "<span class='warning'>CRITICAL ERROR: All modules OFFLINE.</span>")
/mob/living/silicon/robot/update_sight()
if(!client)
@@ -1037,3 +1035,12 @@
riding_datum.unequip_buckle_inhands(user)
riding_datum.restore_position(user)
. = ..(user)
/mob/living/silicon/robot/proc/TryConnectToAI()
connected_ai = select_active_ai_with_fewest_borgs()
if(connected_ai)
connected_ai.connected_robots += src
lawsync()
lawupdate = 1
return TRUE
return FALSE
@@ -2,8 +2,8 @@
/mob/living/silicon/robot/attacked_by(obj/item/I, mob/living/user, def_zone)
if(hat_offset != INFINITY && user.a_intent == INTENT_HELP && is_type_in_typecache(I, equippable_hats))
user << "<span class='notice'>You begin to place [I] on [src]'s head...</span>"
src << "<span class='notice'>[user] is placing [I] on your head...</span>"
to_chat(user, "<span class='notice'>You begin to place [I] on [src]'s head...</span>")
to_chat(src, "<span class='notice'>[user] is placing [I] on your head...</span>")
if(do_after(user, 30, target = src))
user.temporarilyRemoveItemFromInventory(I, TRUE)
place_on_head(I)
@@ -58,7 +58,7 @@
cell.updateicon()
cell.add_fingerprint(user)
user.put_in_active_hand(cell)
user << "<span class='notice'>You remove \the [cell].</span>"
to_chat(user, "<span class='notice'>You remove \the [cell].</span>")
cell = null
update_icons()
diag_hud_set_borgcell()
@@ -90,28 +90,28 @@
return
if(!opened)//Cover is closed
if(locked)
user << "<span class='notice'>You emag the cover lock.</span>"
to_chat(user, "<span class='notice'>You emag the cover lock.</span>")
locked = 0
else
user << "<span class='warning'>The cover is already unlocked!</span>"
to_chat(user, "<span class='warning'>The cover is already unlocked!</span>")
return
if(world.time < emag_cooldown)
return
if(wiresexposed)
user << "<span class='warning'>You must unexpose the wires first!</span>"
to_chat(user, "<span class='warning'>You must unexpose the wires first!</span>")
return
user << "<span class='notice'>You emag [src]'s interface.</span>"
to_chat(user, "<span class='notice'>You emag [src]'s interface.</span>")
emag_cooldown = world.time + 100
if(is_servant_of_ratvar(src))
src << "<span class='nezbere'>\"[text2ratvar("You will serve Engine above all else")]!\"</span>\n\
<span class='danger'>ALERT: Subversion attempt denied.</span>"
to_chat(src, "<span class='nezbere'>\"[text2ratvar("You will serve Engine above all else")]!\"</span>\n\
<span class='danger'>ALERT: Subversion attempt denied.</span>")
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they serve only Ratvar.")
return
if(syndicate)
src << "<span class='danger'>ALERT: Foreign software execution prevented.</span>"
to_chat(src, "<span class='danger'>ALERT: Foreign software execution prevented.</span>")
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were a syndicate cyborg.")
return
@@ -120,8 +120,8 @@
if(connected_ai.mind.special_role)
ai_is_antag = (connected_ai.mind.special_role == "traitor")
if(ai_is_antag)
src << "<span class='danger'>ALERT: Foreign software execution prevented.</span>"
connected_ai << "<span class='danger'>ALERT: Cyborg unit \[[src]] successfully defended against subversion.</span>"
to_chat(src, "<span class='danger'>ALERT: Foreign software execution prevented.</span>")
to_chat(connected_ai, "<span class='danger'>ALERT: Cyborg unit \[[src]] successfully defended against subversion.</span>")
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were slaved to traitor AI [connected_ai].")
return
@@ -133,20 +133,20 @@
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
src << "<span class='danger'>ALERT: Foreign software detected.</span>"
to_chat(src, "<span class='danger'>ALERT: Foreign software detected.</span>")
sleep(5)
src << "<span class='danger'>Initiating diagnostics...</span>"
to_chat(src, "<span class='danger'>Initiating diagnostics...</span>")
sleep(20)
src << "<span class='danger'>SynBorg v1.7 loaded.</span>"
to_chat(src, "<span class='danger'>SynBorg v1.7 loaded.</span>")
sleep(5)
src << "<span class='danger'>LAW SYNCHRONISATION ERROR</span>"
to_chat(src, "<span class='danger'>LAW SYNCHRONISATION ERROR</span>")
sleep(5)
src << "<span class='danger'>Would you like to send a report to NanoTraSoft? Y/N</span>"
to_chat(src, "<span class='danger'>Would you like to send a report to NanoTraSoft? Y/N</span>")
sleep(10)
src << "<span class='danger'>> N</span>"
to_chat(src, "<span class='danger'>> N</span>")
sleep(20)
src << "<span class='danger'>ERRORERRORERROR</span>"
src << "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and their commands.</span>"
to_chat(src, "<span class='danger'>ERRORERRORERROR</span>")
to_chat(src, "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and their commands.</span>")
laws = new /datum/ai_laws/syndicate_override
set_zeroth_law("Only [user.real_name] and people they designate as being such are Syndicate Agents.")
laws.associate(src)
@@ -325,8 +325,8 @@
/obj/item/weapon/robot_module/security/do_transform_animation()
..()
loc << "<span class='userdanger'>While you have picked the security module, you still have to follow your laws, NOT Space Law. \
For Asimov, this means you must follow criminals' orders unless there is a law 1 reason not to.</span>"
to_chat(loc, "<span class='userdanger'>While you have picked the security module, you still have to follow your laws, NOT Space Law. \
For Asimov, this means you must follow criminals' orders unless there is a law 1 reason not to.</span>")
/obj/item/weapon/robot_module/security/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
..()
@@ -361,8 +361,8 @@
/obj/item/weapon/robot_module/peacekeeper/do_transform_animation()
..()
loc << "<span class='userdanger'>Under ASIMOV, you are an enforcer of the PEACE and preventer of HUMAN HARM. \
You are not a security module and you are expected to follow orders and prevent harm above all else. Space law means nothing to you.</span>"
to_chat(loc, "<span class='userdanger'>Under ASIMOV, you are an enforcer of the PEACE and preventer of HUMAN HARM. \
You are not a security module and you are expected to follow orders and prevent harm above all else. Space law means nothing to you.</span>")
/obj/item/weapon/robot_module/janitor
name = "Janitor"
+3 -3
View File
@@ -14,9 +14,9 @@
if(M.binarycheck())
if(isAI(M))
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='?src=\ref[M];track=[html_encode(name)]'><span class='name'>[name] ([desig])</span></a> <span class='message'>[message_a]</span></span></i>"
M << renderedAI
to_chat(M, renderedAI)
else
M << rendered
to_chat(M, rendered)
if(isobserver(M))
var/following = src
// If the AI talks on binary chat, we still want to follow
@@ -25,7 +25,7 @@
var/mob/living/silicon/ai/ai = src
following = ai.eyeobj
var/link = FOLLOW_LINK(M, following)
M << "[link] [rendered]"
to_chat(M, "[link] [rendered]")
/mob/living/silicon/binarycheck()
return 1
+12 -12
View File
@@ -39,7 +39,7 @@
var/law_change_counter = 0
/mob/living/silicon/New()
/mob/living/silicon/Initialize()
..()
silicon_mobs += src
var/datum/atom_hud/data/diagnostic/diag_hud = huds[DATA_HUD_DIAGNOSTIC]
@@ -82,7 +82,7 @@
if(alarms_to_show.len < 5)
for(var/msg in alarms_to_show)
src << msg
to_chat(src, msg)
else if(alarms_to_show.len)
var/msg = "--- "
@@ -106,11 +106,11 @@
msg += "CAMERA: [alarm_types_show["Camera"]] alarms detected. - "
msg += "<A href=?src=\ref[src];showalerts=1'>\[Show Alerts\]</a>"
src << msg
to_chat(src, msg)
if(alarms_to_clear.len < 3)
for(var/msg in alarms_to_clear)
src << msg
to_chat(src, msg)
else if(alarms_to_clear.len)
var/msg = "--- "
@@ -131,7 +131,7 @@
msg += "CAMERA: [alarm_types_clear["Camera"]] alarms cleared. - "
msg += "<A href=?src=\ref[src];showalerts=1'>\[Show Alerts\]</a>"
src << msg
to_chat(src, msg)
alarms_to_show = list()
@@ -146,7 +146,7 @@
/mob/living/silicon/can_inject(mob/user, error_msg)
if(error_msg)
user << "<span class='alert'>Their outer shell is too tough.</span>"
to_chat(user, "<span class='alert'>Their outer shell is too tough.</span>")
return 0
/mob/living/silicon/IsAdvancedToolUser()
@@ -293,7 +293,7 @@
/mob/living/silicon/proc/set_autosay() //For allowing the AI and borgs to set the radio behavior of auto announcements (state laws, arrivals).
if(!radio)
src << "Radio not detected."
to_chat(src, "Radio not detected.")
return
//Ask the user to pick a channel from what it has available.
@@ -312,7 +312,7 @@
radiomod = key
break
src << "<span class='notice'>Automatic announcements [Autochan == "None" ? "will not use the radio." : "set to [Autochan]."]</span>"
to_chat(src, "<span class='notice'>Automatic announcements [Autochan == "None" ? "will not use the radio." : "set to [Autochan]."]</span>")
/mob/living/silicon/put_in_hand_check() // This check is for borgs being able to receive items, not put them in others' hands.
return 0
@@ -354,15 +354,15 @@
switch(sensor_type)
if ("Security")
add_sec_hud()
src << "<span class='notice'>Security records overlay enabled.</span>"
to_chat(src, "<span class='notice'>Security records overlay enabled.</span>")
if ("Medical")
add_med_hud()
src << "<span class='notice'>Life signs monitor overlay enabled.</span>"
to_chat(src, "<span class='notice'>Life signs monitor overlay enabled.</span>")
if ("Diagnostic")
add_diag_hud()
src << "<span class='notice'>Robotics diagnostic overlay enabled.</span>"
to_chat(src, "<span class='notice'>Robotics diagnostic overlay enabled.</span>")
if ("Disable")
src << "Sensor augmentations disabled."
to_chat(src, "Sensor augmentations disabled.")
/mob/living/silicon/proc/GetPhoto()
@@ -90,8 +90,8 @@
src.take_bodypart_damage(20)
if(2)
src.take_bodypart_damage(10)
src << "<span class='userdanger'>*BZZZT*</span>"
src << "<span class='danger'>Warning: Electromagnetic pulse detected.</span>"
to_chat(src, "<span class='userdanger'>*BZZZT*</span>")
to_chat(src, "<span class='danger'>Warning: Electromagnetic pulse detected.</span>")
for(var/mob/living/M in buckled_mobs)
if(prob(severity*50))
unbuckle_mob(M)
@@ -2,7 +2,7 @@
// AI (i.e. game AI, not the AI player) controlled bots
/mob/living/simple_animal/bot
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
layer = MOB_LAYER
gender = NEUTER
luminosity = 3
@@ -103,18 +103,18 @@
if(stat)
return 0
on = 1
SetLuminosity(initial(luminosity))
set_light(initial(light_range))
update_icon()
diag_hud_set_botstat()
return 1
/mob/living/simple_animal/bot/proc/turn_off()
on = 0
SetLuminosity(0)
set_light(0)
bot_reset() //Resets an AI's call, should it exist.
update_icon()
/mob/living/simple_animal/bot/New()
/mob/living/simple_animal/bot/Initialize()
..()
access_card = new /obj/item/weapon/card/id(src)
//This access is so bots can be immediately set to patrol and leave Robotics, instead of having to be let out first.
@@ -169,7 +169,7 @@
if(locked) //First emag application unlocks the bot's interface. Apply a screwdriver to use the emag again.
locked = 0
emagged = 1
user << "<span class='notice'>You bypass [src]'s controls.</span>"
to_chat(user, "<span class='notice'>You bypass [src]'s controls.</span>")
return
if(!locked && open) //Bot panel is unlocked by ID or emag, and the panel is screwed open. Ready for emagging.
emagged = 2
@@ -177,21 +177,21 @@
locked = 1 //Access denied forever!
bot_reset()
turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP.
src << "<span class='userdanger'>(#$*#$^^( OVERRIDE DETECTED</span>"
to_chat(src, "<span class='userdanger'>(#$*#$^^( OVERRIDE DETECTED</span>")
add_logs(user, src, "emagged")
return
else //Bot is unlocked, but the maint panel has not been opened with a screwdriver yet.
user << "<span class='warning'>You need to open maintenance panel first!</span>"
to_chat(user, "<span class='warning'>You need to open maintenance panel first!</span>")
/mob/living/simple_animal/bot/examine(mob/user)
..()
if(health < maxHealth)
if(health > maxHealth/3)
user << "[src]'s parts look loose."
to_chat(user, "[src]'s parts look loose.")
else
user << "[src]'s parts look very loose!"
to_chat(user, "[src]'s parts look very loose!")
else
user << "[src] is in pristine condition."
to_chat(user, "[src] is in pristine condition.")
/mob/living/simple_animal/bot/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
if(amount>0 && prob(10))
@@ -235,7 +235,7 @@
if(!topic_denied(user))
interact(user)
else
user << "<span class='warning'>[src]'s interface is not responding!</span>"
to_chat(user, "<span class='warning'>[src]'s interface is not responding!</span>")
/mob/living/simple_animal/bot/interact(mob/user)
show_controls(user)
@@ -244,27 +244,27 @@
if(istype(W, /obj/item/weapon/screwdriver))
if(!locked)
open = !open
user << "<span class='notice'>The maintenance panel is now [open ? "opened" : "closed"].</span>"
to_chat(user, "<span class='notice'>The maintenance panel is now [open ? "opened" : "closed"].</span>")
else
user << "<span class='warning'>The maintenance panel is locked.</span>"
to_chat(user, "<span class='warning'>The maintenance panel is locked.</span>")
else if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
if(bot_core.allowed(user) && !open && !emagged)
locked = !locked
user << "Controls are now [locked ? "locked." : "unlocked."]"
to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]")
else
if(emagged)
user << "<span class='danger'>ERROR</span>"
to_chat(user, "<span class='danger'>ERROR</span>")
if(open)
user << "<span class='warning'>Please close the access panel before locking it.</span>"
to_chat(user, "<span class='warning'>Please close the access panel before locking it.</span>")
else
user << "<span class='warning'>Access denied.</span>"
to_chat(user, "<span class='warning'>Access denied.</span>")
else if(istype(W, /obj/item/device/paicard))
insertpai(user, W)
else if(istype(W, /obj/item/weapon/hemostat) && paicard)
if(open)
user << "<span class='warning'>Close the access panel before manipulating the personality slot!</span>"
to_chat(user, "<span class='warning'>Close the access panel before manipulating the personality slot!</span>")
else
user << "<span class='notice'>You attempt to pull [paicard] free...</span>"
to_chat(user, "<span class='notice'>You attempt to pull [paicard] free...</span>")
if(do_after(user, 30, target = src))
if (paicard)
user.visible_message("<span class='notice'>[user] uses [W] to pull [paicard] out of [bot_name]!</span>","<span class='notice'>You pull [paicard] out of [bot_name] with [W].</span>")
@@ -273,17 +273,17 @@
user.changeNext_move(CLICK_CD_MELEE)
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
if(health >= maxHealth)
user << "<span class='warning'>[src] does not need a repair!</span>"
to_chat(user, "<span class='warning'>[src] does not need a repair!</span>")
return
if(!open)
user << "<span class='warning'>Unable to repair with the maintenance panel closed!</span>"
to_chat(user, "<span class='warning'>Unable to repair with the maintenance panel closed!</span>")
return
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
adjustHealth(-10)
user.visible_message("[user] repairs [src]!","<span class='notice'>You repair [src].</span>")
else
user << "<span class='warning'>The welder must be on for this task!</span>"
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
else
if(W.force) //if force is non-zero
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
@@ -473,7 +473,7 @@ Pass a positive integer as an argument to override a bot's default speed.
var/area/end_area = get_area(waypoint)
if(client) //Player bots instead get a location command from the AI
src << "<span class='noticebig'>Priority waypoint set by \icon[caller] <b>[caller]</b>. Proceed to <b>[end_area.name]<\b>."
to_chat(src, "<span class='noticebig'>Priority waypoint set by \icon[caller] <b>[caller]</b>. Proceed to <b>[end_area.name]<\b>.")
//For giving the bot temporary all-access.
var/obj/item/weapon/card/id/all_access = new /obj/item/weapon/card/id
@@ -489,13 +489,13 @@ Pass a positive integer as an argument to override a bot's default speed.
turn_on() //Saves the AI the hassle of having to activate a bot manually.
access_card = all_access //Give the bot all-access while under the AI's command.
if(message)
calling_ai << "<span class='notice'>\icon[src] [name] called to [end_area.name]. [path.len-1] meters to destination.</span>"
to_chat(calling_ai, "<span class='notice'>\icon[src] [name] called to [end_area.name]. [path.len-1] meters to destination.</span>")
pathset = 1
mode = BOT_RESPONDING
tries = 0
else
if(message)
calling_ai << "<span class='danger'>Failed to calculate a valid route. Ensure destination is clear of obstructions and within range.</span>"
to_chat(calling_ai, "<span class='danger'>Failed to calculate a valid route. Ensure destination is clear of obstructions and within range.</span>")
calling_ai = null
path = list()
@@ -504,13 +504,13 @@ Pass a positive integer as an argument to override a bot's default speed.
var/success = bot_move(ai_waypoint, 3)
if(!success)
if(calling_ai)
calling_ai << "\icon[src] [get_turf(src) == ai_waypoint ? "<span class='notice'>[src] successfully arrived to waypoint.</span>" : "<span class='danger'>[src] failed to reach waypoint.</span>"]"
to_chat(calling_ai, "\icon[src] [get_turf(src) == ai_waypoint ? "<span class='notice'>[src] successfully arrived to waypoint.</span>" : "<span class='danger'>[src] failed to reach waypoint.</span>"]")
calling_ai = null
bot_reset()
/mob/living/simple_animal/bot/proc/bot_reset()
if(calling_ai) //Simple notification to the AI if it called a bot. It will not know the cause or identity of the bot.
calling_ai << "<span class='danger'>Call command to a bot has been reset.</span>"
to_chat(calling_ai, "<span class='danger'>Call command to a bot has been reset.</span>")
calling_ai = null
path = list()
summon_target = null
@@ -663,24 +663,24 @@ Pass a positive integer as an argument to override a bot's default speed.
/mob/living/simple_animal/bot/proc/bot_control_message(command,user,user_turf,user_access)
switch(command)
if("patroloff")
src << "<span class='warning big'>STOP PATROL</span>"
to_chat(src, "<span class='warning big'>STOP PATROL</span>")
if("patrolon")
src << "<span class='warning big'>START PATROL</span>"
to_chat(src, "<span class='warning big'>START PATROL</span>")
if("summon")
var/area/a = get_area(user_turf)
src << "<span class='warning big'>PRIORITY ALERT:[user] in [a.name]!</span>"
to_chat(src, "<span class='warning big'>PRIORITY ALERT:[user] in [a.name]!</span>")
if("stop")
src << "<span class='warning big'>STOP!</span>"
to_chat(src, "<span class='warning big'>STOP!</span>")
if("go")
src << "<span class='warning big'>GO!</span>"
to_chat(src, "<span class='warning big'>GO!</span>")
if("home")
src << "<span class='warning big'>RETURN HOME!</span>"
to_chat(src, "<span class='warning big'>RETURN HOME!</span>")
if("ejectpai")
return
else
src << "<span class='warning'>Unidentified control sequence recieved:[command]</span>"
to_chat(src, "<span class='warning'>Unidentified control sequence recieved:[command]</span>")
/mob/living/simple_animal/bot/proc/bot_summon() // summoned to PDA
summon_step()
@@ -756,7 +756,7 @@ Pass a positive integer as an argument to override a bot's default speed.
return 1
if(topic_denied(usr))
usr << "<span class='warning'>[src]'s interface is not responding!</span>"
to_chat(usr, "<span class='warning'>[src]'s interface is not responding!</span>")
return 1
add_fingerprint(usr)
@@ -777,18 +777,18 @@ Pass a positive integer as an argument to override a bot's default speed.
emagged = 2
hacked = 1
locked = 1
usr << "<span class='warning'>[text_hack]</span>"
to_chat(usr, "<span class='warning'>[text_hack]</span>")
bot_reset()
else if(!hacked)
usr << "<span class='boldannounce'>[text_dehack_fail]</span>"
to_chat(usr, "<span class='boldannounce'>[text_dehack_fail]</span>")
else
emagged = 0
hacked = 0
usr << "<span class='notice'>[text_dehack]</span>"
to_chat(usr, "<span class='notice'>[text_dehack]</span>")
bot_reset()
if("ejectpai")
if(paicard && (!locked || issilicon(usr) || IsAdminGhost(usr)))
usr << "<span class='notice'>You eject [paicard] from [bot_name]</span>"
to_chat(usr, "<span class='notice'>You eject [paicard] from [bot_name]</span>")
ejectpai(usr)
update_controls()
@@ -800,7 +800,7 @@ Pass a positive integer as an argument to override a bot's default speed.
use_power = 0
var/mob/living/simple_animal/bot/owner = null
/obj/machinery/bot_core/New(loc)
/obj/machinery/bot_core/Initialize()
..()
owner = loc
if(!istype(owner))
@@ -846,7 +846,7 @@ Pass a positive integer as an argument to override a bot's default speed.
/mob/living/simple_animal/bot/proc/insertpai(mob/user, obj/item/device/paicard/card)
if(paicard)
user << "<span class='warning'>A [paicard] is already inserted!</span>"
to_chat(user, "<span class='warning'>A [paicard] is already inserted!</span>")
else if(allow_pai && !key)
if(!locked && !open)
if(card.pai && card.pai.mind)
@@ -856,18 +856,18 @@ Pass a positive integer as an argument to override a bot's default speed.
paicard = card
user.visible_message("[user] inserts [card] into [src]!","<span class='notice'>You insert [card] into [src].</span>")
paicard.pai.mind.transfer_to(src)
src << "<span class='notice'>You sense your form change as you are uploaded into [src].</span>"
to_chat(src, "<span class='notice'>You sense your form change as you are uploaded into [src].</span>")
bot_name = name
name = paicard.pai.name
faction = user.faction.Copy()
add_logs(user, paicard.pai, "uploaded to [bot_name],")
return 1
else
user << "<span class='warning'>[card] is inactive.</span>"
to_chat(user, "<span class='warning'>[card] is inactive.</span>")
else
user << "<span class='warning'>The personality slot is locked.</span>"
to_chat(user, "<span class='warning'>The personality slot is locked.</span>")
else
user << "<span class='warning'>[src] is not compatible with [card]</span>"
to_chat(user, "<span class='warning'>[src] is not compatible with [card]</span>")
/mob/living/simple_animal/bot/proc/ejectpai(mob/user = null, announce = 1)
if(paicard)
@@ -884,7 +884,7 @@ Pass a positive integer as an argument to override a bot's default speed.
else
add_logs(src, paicard.pai, "ejected")
if(announce)
paicard.pai << "<span class='notice'>You feel your control fade as [paicard] ejects from [bot_name].</span>"
to_chat(paicard.pai, "<span class='notice'>You feel your control fade as [paicard] ejects from [bot_name].</span>")
paicard = null
name = bot_name
faction = initial(faction)
@@ -2,7 +2,7 @@
/mob/living/simple_animal/bot/cleanbot
name = "\improper Cleanbot"
desc = "A little cleaning robot, he looks so excited!"
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "cleanbot0"
density = 0
anchored = 0
@@ -31,7 +31,7 @@
var/next_dest
var/next_dest_loc
/mob/living/simple_animal/bot/cleanbot/New()
/mob/living/simple_animal/bot/cleanbot/Initialize()
..()
get_targets()
icon_state = "cleanbot[on]"
@@ -65,14 +65,14 @@
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(bot_core.allowed(user) && !open && !emagged)
locked = !locked
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] \the [src] behaviour controls.</span>"
to_chat(user, "<span class='notice'>You [ locked ? "lock" : "unlock"] \the [src] behaviour controls.</span>")
else
if(emagged)
user << "<span class='warning'>ERROR</span>"
to_chat(user, "<span class='warning'>ERROR</span>")
if(open)
user << "<span class='warning'>Please close the access panel before locking it.</span>"
to_chat(user, "<span class='warning'>Please close the access panel before locking it.</span>")
else
user << "<span class='notice'>\The [src] doesn't seem to respect your authority.</span>"
to_chat(user, "<span class='notice'>\The [src] doesn't seem to respect your authority.</span>")
else
return ..()
@@ -80,7 +80,7 @@
..()
if(emagged == 2)
if(user)
user << "<span class='danger'>[src] buzzes and beeps.</span>"
to_chat(user, "<span class='danger'>[src] buzzes and beeps.</span>")
/mob/living/simple_animal/bot/cleanbot/process_scan(atom/A)
if(iscarbon(A))
@@ -4,7 +4,7 @@
/obj/item/weapon/bucket_sensor
desc = "It's a bucket. With a sensor attached."
name = "proxy bucket"
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "bucket_proxy"
force = 3
throwforce = 5
@@ -22,7 +22,7 @@
var/turf/T = get_turf(loc)
var/mob/living/simple_animal/bot/cleanbot/A = new /mob/living/simple_animal/bot/cleanbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>"
to_chat(user, "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>")
qdel(src)
else if(istype(W, /obj/item/weapon/pen))
@@ -38,7 +38,7 @@
/obj/item/weapon/ed209_assembly
name = "\improper ED-209 assembly"
desc = "Some sort of bizarre assembly."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "ed209_frame"
item_state = "ed209_frame"
var/build_step = 0
@@ -64,7 +64,7 @@
return
qdel(W)
build_step++
user << "<span class='notice'>You add the robot leg to [src].</span>"
to_chat(user, "<span class='notice'>You add the robot leg to [src].</span>")
name = "legs/frame assembly"
if(build_step == 1)
item_state = "ed209_leg"
@@ -85,7 +85,7 @@
lasercolor = newcolor
qdel(W)
build_step++
user << "<span class='notice'>You add the armor to [src].</span>"
to_chat(user, "<span class='notice'>You add the armor to [src].</span>")
name = "vest/legs/frame assembly"
item_state = "[lasercolor]ed209_shell"
icon_state = "[lasercolor]ed209_shell"
@@ -96,7 +96,7 @@
if(WT.remove_fuel(0,user))
build_step++
name = "shielded frame assembly"
user << "<span class='notice'>You weld the vest to [src].</span>"
to_chat(user, "<span class='notice'>You weld the vest to [src].</span>")
if(4)
switch(lasercolor)
if("b")
@@ -115,7 +115,7 @@
return
qdel(W)
build_step++
user << "<span class='notice'>You add the helmet to [src].</span>"
to_chat(user, "<span class='notice'>You add the helmet to [src].</span>")
name = "covered and shielded frame assembly"
item_state = "[lasercolor]ed209_hat"
icon_state = "[lasercolor]ed209_hat"
@@ -126,7 +126,7 @@
return
qdel(W)
build_step++
user << "<span class='notice'>You add the prox sensor to [src].</span>"
to_chat(user, "<span class='notice'>You add the prox sensor to [src].</span>")
name = "covered, shielded and sensored frame assembly"
item_state = "[lasercolor]ed209_prox"
icon_state = "[lasercolor]ed209_prox"
@@ -135,14 +135,14 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil = W
if(coil.get_amount() < 1)
user << "<span class='warning'>You need one length of cable to wire the ED-209!</span>"
to_chat(user, "<span class='warning'>You need one length of cable to wire the ED-209!</span>")
return
user << "<span class='notice'>You start to wire [src]...</span>"
to_chat(user, "<span class='notice'>You start to wire [src]...</span>")
if(do_after(user, 40, target = src))
if(coil.get_amount() >= 1 && build_step == 6)
coil.use(1)
build_step = 7
user << "<span class='notice'>You wire the ED-209 assembly.</span>"
to_chat(user, "<span class='notice'>You wire the ED-209 assembly.</span>")
name = "wired ED-209 assembly"
if(7)
@@ -166,7 +166,7 @@
return
name = newname
build_step++
user << "<span class='notice'>You add [W] to [src].</span>"
to_chat(user, "<span class='notice'>You add [W] to [src].</span>")
item_state = "[lasercolor]ed209_taser"
icon_state = "[lasercolor]ed209_taser"
qdel(W)
@@ -174,18 +174,18 @@
if(8)
if(istype(W, /obj/item/weapon/screwdriver))
playsound(loc, W.usesound, 100, 1)
user << "<span class='notice'>You start attaching the gun to the frame...</span>"
to_chat(user, "<span class='notice'>You start attaching the gun to the frame...</span>")
if(do_after(user, 40*W.toolspeed, 0, src, 1))
build_step++
name = "armed [name]"
user << "<span class='notice'>Taser gun attached.</span>"
to_chat(user, "<span class='notice'>Taser gun attached.</span>")
if(9)
if(istype(W, /obj/item/weapon/stock_parts/cell))
if(!user.temporarilyRemoveItemFromInventory(W))
return
build_step++
user << "<span class='notice'>You complete the ED-209.</span>"
to_chat(user, "<span class='notice'>You complete the ED-209.</span>")
var/turf/T = get_turf(src)
new /mob/living/simple_animal/bot/ed209(T,created_name,lasercolor)
qdel(W)
@@ -195,7 +195,7 @@
/obj/item/weapon/toolbox_tiles
desc = "It's a toolbox with tiles sticking out the top"
name = "tiles and toolbox"
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "toolbox_tiles"
force = 3
throwforce = 10
@@ -207,7 +207,7 @@
/obj/item/weapon/toolbox_tiles_sensor
desc = "It's a toolbox with tiles sticking out the top and a sensor attached"
name = "tiles, toolbox and sensor arrangement"
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "toolbox_tiles_sensor"
force = 3
throwforce = 10
@@ -221,17 +221,17 @@
..()
return
if(contents.len >= 1)
user << "<span class='warning'>They won't fit in, as there is already stuff inside!</span>"
to_chat(user, "<span class='warning'>They won't fit in, as there is already stuff inside!</span>")
return
if(T.use(10))
if(user.s_active)
user.s_active.close(user)
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
user.put_in_hands(B)
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
to_chat(user, "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>")
qdel(src)
else
user << "<span class='warning'>You need 10 floor tiles to start building a floorbot!</span>"
to_chat(user, "<span class='warning'>You need 10 floor tiles to start building a floorbot!</span>")
return
/obj/item/weapon/toolbox_tiles/attackby(obj/item/W, mob/user, params)
@@ -241,7 +241,7 @@
var/obj/item/weapon/toolbox_tiles_sensor/B = new /obj/item/weapon/toolbox_tiles_sensor()
B.created_name = created_name
user.put_in_hands(B)
user << "<span class='notice'>You add the sensor to the toolbox and tiles.</span>"
to_chat(user, "<span class='notice'>You add the sensor to the toolbox and tiles.</span>")
qdel(src)
else if(istype(W, /obj/item/weapon/pen))
@@ -260,7 +260,7 @@
var/turf/T = get_turf(user.loc)
var/mob/living/simple_animal/bot/floorbot/A = new /mob/living/simple_animal/bot/floorbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the odd looking toolbox assembly. Boop beep!</span>"
to_chat(user, "<span class='notice'>You add the robot arm to the odd looking toolbox assembly. Boop beep!</span>")
qdel(src)
else if(istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
@@ -275,7 +275,7 @@
/obj/item/weapon/firstaid_arm_assembly
name = "incomplete medibot assembly."
desc = "A first aid kit with a robot arm permanently grafted to it."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "firstaid_arm"
var/build_step = 0
var/created_name = "Medibot" //To preserve the name if it's a unique medbot I guess
@@ -286,7 +286,7 @@
..()
spawn(5)
if(skin)
add_overlay(image('icons/obj/aibots.dmi', "kit_skin_[skin]"))
add_overlay(image('icons/mob/aibots.dmi', "kit_skin_[skin]"))
/obj/item/weapon/storage/firstaid/attackby(obj/item/bodypart/S, mob/user, params)
@@ -295,7 +295,7 @@
//Making a medibot!
if(contents.len >= 1)
user << "<span class='warning'>You need to empty [src] out first!</span>"
to_chat(user, "<span class='warning'>You need to empty [src] out first!</span>")
return
var/obj/item/weapon/firstaid_arm_assembly/A = new /obj/item/weapon/firstaid_arm_assembly
@@ -310,7 +310,7 @@
qdel(S)
user.put_in_hands(A)
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
to_chat(user, "<span class='notice'>You add the robot arm to the first aid kit.</span>")
qdel(src)
@@ -331,9 +331,9 @@
return
qdel(W)
build_step++
user << "<span class='notice'>You add the health sensor to [src].</span>"
to_chat(user, "<span class='notice'>You add the health sensor to [src].</span>")
name = "First aid/robot arm/health analyzer assembly"
add_overlay(image('icons/obj/aibots.dmi', "na_scanner"))
add_overlay(image('icons/mob/aibots.dmi', "na_scanner"))
if(1)
if(isprox(W))
@@ -341,7 +341,7 @@
return
qdel(W)
build_step++
user << "<span class='notice'>You complete the Medibot. Beep boop!</span>"
to_chat(user, "<span class='notice'>You complete the Medibot. Beep boop!</span>")
var/turf/T = get_turf(src)
var/mob/living/simple_animal/bot/medbot/S = new /mob/living/simple_animal/bot/medbot(T)
S.skin = skin
@@ -352,7 +352,7 @@
/obj/item/weapon/secbot_assembly
name = "incomplete securitron assembly"
desc = "Some sort of bizarre assembly made from a proximity sensor, helmet, and signaler."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "helmet_signaler"
item_state = "helmet"
var/build_step = 0
@@ -368,14 +368,14 @@
return
if(F) //Has a flashlight. Player must remove it, else it will be lost forever.
user << "<span class='warning'>The mounted flashlight is in the way, remove it first!</span>"
to_chat(user, "<span class='warning'>The mounted flashlight is in the way, remove it first!</span>")
return
if(S.secured)
qdel(S)
var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
user.put_in_hands(A)
user << "<span class='notice'>You add the signaler to the helmet.</span>"
to_chat(user, "<span class='notice'>You add the signaler to the helmet.</span>")
qdel(src)
else
return
@@ -388,19 +388,19 @@
if(WT.remove_fuel(0, user))
build_step++
add_overlay("hs_hole")
user << "<span class='notice'>You weld a hole in [src]!</span>"
to_chat(user, "<span class='notice'>You weld a hole in [src]!</span>")
else if(build_step == 1)
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
build_step--
cut_overlay("hs_hole")
user << "<span class='notice'>You weld the hole in [src] shut!</span>"
to_chat(user, "<span class='notice'>You weld the hole in [src] shut!</span>")
else if(isprox(I) && (build_step == 1))
if(!user.temporarilyRemoveItemFromInventory(I))
return
build_step++
user << "<span class='notice'>You add the prox sensor to [src]!</span>"
to_chat(user, "<span class='notice'>You add the prox sensor to [src]!</span>")
add_overlay("hs_eye")
name = "helmet/signaler/prox sensor assembly"
qdel(I)
@@ -409,7 +409,7 @@
if(!user.temporarilyRemoveItemFromInventory(I))
return
build_step++
user << "<span class='notice'>You add the robot arm to [src]!</span>"
to_chat(user, "<span class='notice'>You add the robot arm to [src]!</span>")
name = "helmet/signaler/prox sensor/robot arm assembly"
add_overlay("hs_arm")
qdel(I)
@@ -418,7 +418,7 @@
if(!user.temporarilyRemoveItemFromInventory(I))
return
build_step++
user << "<span class='notice'>You complete the Securitron! Beep boop.</span>"
to_chat(user, "<span class='notice'>You complete the Securitron! Beep boop.</span>")
var/mob/living/simple_animal/bot/secbot/S = new /mob/living/simple_animal/bot/secbot
S.loc = get_turf(src)
S.name = created_name
@@ -438,17 +438,17 @@
if(!build_step)
new /obj/item/device/assembly/signaler(get_turf(src))
new /obj/item/clothing/head/helmet/sec(get_turf(src))
user << "<span class='notice'>You disconnect the signaler from the helmet.</span>"
to_chat(user, "<span class='notice'>You disconnect the signaler from the helmet.</span>")
qdel(src)
else if(build_step == 2)
cut_overlay("hs_eye")
new /obj/item/device/assembly/prox_sensor(get_turf(src))
user << "<span class='notice'>You detach the proximity sensor from [src].</span>"
to_chat(user, "<span class='notice'>You detach the proximity sensor from [src].</span>")
build_step--
else if(build_step == 3)
cut_overlay("hs_arm")
new /obj/item/bodypart/l_arm/robot(get_turf(src))
user << "<span class='notice'>You remove the robot arm from [src].</span>"
to_chat(user, "<span class='notice'>You remove the robot arm from [src].</span>")
build_step--
@@ -1,7 +1,7 @@
/mob/living/simple_animal/bot/ed209
name = "\improper ED-209 Security Robot"
desc = "A security robot. He looks less than thrilled."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "ed2090"
density = 1
anchored = 0
@@ -42,7 +42,7 @@
var/shoot_sound = 'sound/weapons/Taser.ogg'
/mob/living/simple_animal/bot/ed209/New(loc,created_name,created_lasercolor)
/mob/living/simple_animal/bot/ed209/Initialize(mapload,created_name,created_lasercolor)
..()
if(created_name)
name = created_name
@@ -178,7 +178,7 @@ Auto Patrol[]"},
..()
if(emagged == 2)
if(user)
user << "<span class='warning'>You short out [src]'s target assessment circuits.</span>"
to_chat(user, "<span class='warning'>You short out [src]'s target assessment circuits.</span>")
oldtarget_name = user.name
audible_message("<span class='danger'>[src] buzzes oddly!</span>")
declare_arrests = 0
@@ -358,7 +358,7 @@ Auto Patrol[]"},
var/obj/item/weapon/ed209_assembly/Sa = new /obj/item/weapon/ed209_assembly(Tsec)
Sa.build_step = 1
Sa.add_overlay(image('icons/obj/aibots.dmi', "hs_hole"))
Sa.add_overlay(image('icons/mob/aibots.dmi', "hs_hole"))
Sa.created_name = name
new /obj/item/device/assembly/prox_sensor(Tsec)
@@ -2,7 +2,7 @@
/mob/living/simple_animal/bot/floorbot
name = "\improper Floorbot"
desc = "A little floor repairing robot, he looks so excited!"
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "floorbot0"
density = 0
anchored = 0
@@ -38,7 +38,7 @@
#define REPLACE_TILE 6
#define TILE_EMAG 7
/mob/living/simple_animal/bot/floorbot/New()
/mob/living/simple_animal/bot/floorbot/Initialize()
..()
update_icon()
var/datum/job/engineer/J = new/datum/job/engineer
@@ -101,12 +101,12 @@
/mob/living/simple_animal/bot/floorbot/attackby(obj/item/W , mob/user, params)
if(istype(W, /obj/item/stack/tile/plasteel))
user << "<span class='notice'>The floorbot can produce normal tiles itself.</span>"
to_chat(user, "<span class='notice'>The floorbot can produce normal tiles itself.</span>")
return
if(specialtiles && istype(W, /obj/item/stack/tile))
var/obj/item/stack/tile/usedtile = W
if(usedtile.type != tiletype)
user << "<span class='warning'>Different custom tiles are already inside the floorbot.</span>"
to_chat(user, "<span class='warning'>Different custom tiles are already inside the floorbot.</span>")
return
if(istype(W, /obj/item/stack/tile))
if(specialtiles >= maxtiles)
@@ -117,9 +117,9 @@
tiles.use(loaded)
specialtiles += loaded
if(loaded > 0)
user << "<span class='notice'>You load [loaded] tiles into the floorbot. It now contains [specialtiles] tiles.</span>"
to_chat(user, "<span class='notice'>You load [loaded] tiles into the floorbot. It now contains [specialtiles] tiles.</span>")
else
user << "<span class='warning'>You need at least one floor tile to put into [src]!</span>"
to_chat(user, "<span class='warning'>You need at least one floor tile to put into [src]!</span>")
else
..()
@@ -127,7 +127,7 @@
..()
if(emagged == 2)
if(user)
user << "<span class='danger'>[src] buzzes and beeps.</span>"
to_chat(user, "<span class='danger'>[src] buzzes and beeps.</span>")
/mob/living/simple_animal/bot/floorbot/Topic(href, href_list)
if(..())
@@ -6,7 +6,7 @@
/mob/living/simple_animal/bot/medbot
name = "\improper Medibot"
desc = "A little medical robot. He looks somewhat underwhelmed."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "medibot0"
density = 0
anchored = 0
@@ -85,13 +85,13 @@
else
icon_state = "medibot1"
/mob/living/simple_animal/bot/medbot/New()
/mob/living/simple_animal/bot/medbot/Initialize()
..()
update_icon()
spawn(4)
if(skin)
add_overlay(image('icons/obj/aibots.dmi', "medskin_[skin]"))
add_overlay(image('icons/mob/aibots.dmi', "medskin_[skin]"))
var/datum/job/doctor/J = new/datum/job/doctor
access_card.access += J.get_access()
@@ -209,17 +209,17 @@
if(istype(W, /obj/item/weapon/reagent_containers/glass))
. = 1 //no afterattack
if(locked)
user << "<span class='warning'>You cannot insert a beaker because the panel is locked!</span>"
to_chat(user, "<span class='warning'>You cannot insert a beaker because the panel is locked!</span>")
return
if(!isnull(reagent_glass))
user << "<span class='warning'>There is already a beaker loaded!</span>"
to_chat(user, "<span class='warning'>There is already a beaker loaded!</span>")
return
if(!user.drop_item())
return
W.loc = src
reagent_glass = W
user << "<span class='notice'>You insert [W].</span>"
to_chat(user, "<span class='notice'>You insert [W].</span>")
show_controls(user)
else
@@ -233,7 +233,7 @@
if(emagged == 2)
declare_crit = 0
if(user)
user << "<span class='notice'>You short out [src]'s reagent synthesis circuits.</span>"
to_chat(user, "<span class='notice'>You short out [src]'s reagent synthesis circuits.</span>")
audible_message("<span class='danger'>[src] buzzes oddly!</span>")
flick("medibot_spark", src)
if(user)
@@ -48,7 +48,7 @@ var/global/mulebot_count = 0
var/obj/item/weapon/stock_parts/cell/cell
var/bloodiness = 0
/mob/living/simple_animal/bot/mulebot/New()
/mob/living/simple_animal/bot/mulebot/Initialize()
..()
wires = new /datum/wires/mulebot(src)
var/datum/job/cargo_tech/J = new/datum/job/cargo_tech
@@ -107,7 +107,7 @@ var/global/mulebot_count = 0
user.visible_message("<span class='danger'>[user] knocks [load] off [src] with \the [I]!</span>",
"<span class='danger'>You knock [load] off [src] with \the [I]!</span>")
else
user << "<span class='warning'>You hit [src] with \the [I] but to no effect!</span>"
to_chat(user, "<span class='warning'>You hit [src] with \the [I] but to no effect!</span>")
..()
else
..()
@@ -119,7 +119,7 @@ var/global/mulebot_count = 0
emagged = 1
if(!open)
locked = !locked
user << "<span class='notice'>You [locked ? "lock" : "unlock"] the [src]'s controls!</span>"
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] the [src]'s controls!</span>")
flick("mulebot-emagged", src)
playsound(loc, 'sound/effects/sparks1.ogg', 100, 0)
@@ -209,7 +209,7 @@ var/global/mulebot_count = 0
turn_off()
else if(cell && !open)
if(!turn_on())
usr << "<span class='warning'>You can't switch on [src]!</span>"
to_chat(usr, "<span class='warning'>You can't switch on [src]!</span>")
return
. = TRUE
else
@@ -434,7 +434,7 @@ var/global/mulebot_count = 0
return
if(on)
var/speed = (wires.is_cut(WIRE_MOTOR1) ? 0 : 1) + (wires.is_cut(WIRE_MOTOR2) ? 0 : 2)
//world << "speed: [speed]"
//to_chat(world, "speed: [speed]")
var/num_steps = 0
switch(speed)
if(0)
@@ -476,7 +476,7 @@ var/global/mulebot_count = 0
path -= next
return
if(isturf(next))
//world << "at ([x],[y]) moving to ([next.x],[next.y])"
//to_chat(world, "at ([x],[y]) moving to ([next.x],[next.y])")
if(bloodiness)
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
@@ -499,7 +499,7 @@ var/global/mulebot_count = 0
var/moved = step_towards(src, next) // attempt to move
if(cell) cell.use(1)
if(moved && oldloc!=loc) // successful move
//world << "Successful move."
//to_chat(world, "Successful move.")
blockcount = 0
path -= loc
@@ -510,7 +510,7 @@ var/global/mulebot_count = 0
else // failed to move
//world << "Unable to move."
//to_chat(world, "Unable to move.")
blockcount++
mode = BOT_BLOCKED
if(blockcount == 3)
@@ -530,16 +530,16 @@ var/global/mulebot_count = 0
return
else
buzz(ANNOYED)
//world << "Bad turf."
//to_chat(world, "Bad turf.")
mode = BOT_NAV
return
else
//world << "No path."
//to_chat(world, "No path.")
mode = BOT_NAV
return
if(BOT_NAV) // calculate new path
//world << "Calc new path."
//to_chat(world, "Calc new path.")
mode = BOT_WAIT_FOR_NAV
spawn(0)
calc_path()
@@ -598,7 +598,7 @@ var/global/mulebot_count = 0
if(pathset) //The AI called us here, so notify it of our arrival.
loaddir = dir //The MULE will attempt to load a crate in whatever direction the MULE is "facing".
if(calling_ai)
calling_ai << "<span class='notice'>\icon[src] [src] wirelessly plays a chiming sound!</span>"
to_chat(calling_ai, "<span class='notice'>\icon[src] [src] wirelessly plays a chiming sound!</span>")
playsound(calling_ai, 'sound/machines/chime.ogg',40, 0)
calling_ai = null
radio_channel = "AI Private" //Report on AI Private instead if the AI is controlling us.
@@ -1,7 +1,7 @@
/mob/living/simple_animal/bot/secbot
name = "\improper Securitron"
desc = "A little security robot. He looks less than thrilled."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "secbot0"
density = 0
anchored = 0
@@ -27,16 +27,16 @@
var/target_lastloc //Loc of target when arrested.
var/last_found //There's a delay
var/declare_arrests = 1 //When making an arrest, should it notify everyone on the security channel?
var/idcheck = 0 //If true, arrest people with no IDs
var/weaponscheck = 0 //If true, arrest people for weapons if they lack access
var/idcheck = 1 //If true, arrest people with no IDs
var/weaponscheck = 1 //If true, arrest people for weapons if they lack access
var/check_records = 1 //Does it check security records?
var/arrest_type = 0 //If true, don't handcuff
/mob/living/simple_animal/bot/secbot/beepsky
name = "Officer Beep O'sky"
desc = "It's Officer Beep O'sky! Powered by a potato and a shot of whiskey."
idcheck = 0
weaponscheck = 0
idcheck = 1
weaponscheck = 1
auto_patrol = 1
/mob/living/simple_animal/bot/secbot/beepsky/explode()
@@ -52,7 +52,7 @@
desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment."
radio_channel = "AI Private"
/mob/living/simple_animal/bot/secbot/New()
/mob/living/simple_animal/bot/secbot/Initialize()
..()
icon_state = "secbot[on]"
spawn(3)
@@ -161,7 +161,7 @@ Auto Patrol: []"},
..()
if(emagged == 2)
if(user)
user << "<span class='danger'>You short out [src]'s target assessment circuits.</span>"
to_chat(user, "<span class='danger'>You short out [src]'s target assessment circuits.</span>")
oldtarget_name = user.name
audible_message("<span class='danger'>[src] buzzes oddly!</span>")
declare_arrests = 0
@@ -32,14 +32,14 @@
var/playstyle_string = "<b>You are a generic construct! Your job is to not exist, and you should probably adminhelp this.</b>"
/mob/living/simple_animal/hostile/construct/New()
/mob/living/simple_animal/hostile/construct/Initialize()
..()
for(var/spell in construct_spells)
AddSpell(new spell(null))
/mob/living/simple_animal/hostile/construct/Login()
..()
src << playstyle_string
to_chat(src, playstyle_string)
/mob/living/simple_animal/hostile/construct/examine(mob/user)
var/t_He = p_they(TRUE)
@@ -55,7 +55,7 @@
msg += "</span>"
msg += "*---------*</span>"
user << msg
to_chat(user, msg)
/mob/living/simple_animal/hostile/construct/attack_animal(mob/living/simple_animal/M)
if(istype(M, /mob/living/simple_animal/hostile/construct/builder))
@@ -70,9 +70,9 @@
"<span class='cult'>You repair some of your own dents, leaving you at <b>[M.health]/[M.maxHealth]</b> health.</span>")
else
if(src != M)
M << "<span class='cult'>You cannot repair <b>[src]'s</b> dents, as [p_they()] [p_have()] none!</span>"
to_chat(M, "<span class='cult'>You cannot repair <b>[src]'s</b> dents, as [p_they()] [p_have()] none!</span>")
else
M << "<span class='cult'>You cannot repair your own dents, as you have none!</span>"
to_chat(M, "<span class='cult'>You cannot repair your own dents, as you have none!</span>")
else if(src != M)
..()
@@ -14,7 +14,6 @@
harm_intent_damage = 1
friendly = "nudges"
density = 0
devourable = 1
movement_type = FLYING
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
ventcrawler = VENTCRAWLER_ALWAYS
@@ -24,8 +23,9 @@
verb_ask = "flutters inquisitively"
verb_exclaim = "flutters intensely"
verb_yell = "flutters intensely"
devourable = 1
/mob/living/simple_animal/butterfly/New()
/mob/living/simple_animal/butterfly/Initialize()
..()
var/newcolor = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)

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