diff --git a/baystation12.dme b/baystation12.dme
index 363b635e215..baee00ea23f 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -1081,7 +1081,6 @@
#include "code\WorkInProgress\AI_Visibility.dm"
#include "code\WorkInProgress\buildmode.dm"
#include "code\WorkInProgress\explosion_particles.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Tajara\examine.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\say.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajara_transformation.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran.dm"
diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
index ec544508649..2f6f5696cf5 100644
--- a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
@@ -9,6 +9,7 @@
universal_speak = 1 //hacky fix until someone can figure out how to make them only understand humans
taj_talk_understand = 1
voice_message = "mrowls"
+ examine_text = "one of the cat-like Tajarans."
/mob/living/carbon/human/tajaran/New()
tajspeak_letters = new/list("~","*","-")
diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm
index de353cf9c8c..6a2c39a59c2 100644
--- a/code/defines/procs/helpers.dm
+++ b/code/defines/procs/helpers.dm
@@ -199,15 +199,17 @@
while(Li <= L.len && Ri <= R.len)
if(sorttext(L[Li], R[Ri]) < 1)
var/item = R[Ri++]
- result += item
if(R[item])
result[item] = R[item]
+ else
+ result += item
else
var/item = L[Li++]
- result += item
if(L[item])
result[item] = L[item]
+ else
+ result += item
if(Li <= L.len)
return (result + L.Copy(Li, 0))
@@ -779,6 +781,14 @@ Turf and target are seperate in case you want to teleport some distance from a t
select = input("AI signals detected:", "AI selection") in ais
return ais[select]
+/proc/get_sorted_mobs()
+ var/new_list = list()
+ var/old_list = getmobs()
+ for(var/named in old_list)
+ new_list += old_list[named]
+ return new_list
+
+
/proc/getmobs()
var/list/mobs = sortmobs()
@@ -802,72 +812,38 @@ Turf and target are seperate in case you want to teleport some distance from a t
name += " \[dead\]"
creatures[name] = M
- return creatures
+ return sortList(creatures)
/proc/sortmobs()
- var/list/mob_list = list()
var/list/temp_list = list()
for(var/mob/living/silicon/ai/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
for(var/mob/living/silicon/pai/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
for(var/mob/living/silicon/robot/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
for(var/mob/living/carbon/human/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
for(var/mob/living/carbon/brain/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
for(var/mob/living/carbon/alien/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
for(var/mob/dead/observer/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
for(var/mob/new_player/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
for(var/mob/living/carbon/monkey/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
for(var/mob/living/carbon/metroid/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
for(var/mob/living/simple_animal/M in world)
temp_list.Add(M)
- sortList(temp_list)
- mob_list += temp_list
- temp_list = list()
// for(var/mob/living/silicon/hivebot/M in world)
// mob_list.Add(M)
// for(var/mob/living/silicon/hive_mainframe/M in world)
// mob_list.Add(M)
- return mob_list
+ return temp_list
/proc/convert2energy(var/M)
var/E = M*(SPEED_OF_LIGHT_SQ)
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index d61a98881a8..fcc8d14e423 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -78,6 +78,20 @@
var/datum/player_info/P = new
P.author = usr.key
P.content = add
+ var/modifyer = "th"
+ switch(time2text(world.timeofday, "DD"))
+ if("01","21","31")
+ modifyer = "st"
+ if("02","22",)
+ modifyer = "nd"
+ if("03","23")
+ modifyer = "rd"
+ var/day_string = "[time2text(world.timeofday, "DD")][modifyer]"
+ if(copytext(day_string,1,2) == "0")
+ day_string = copytext(day_string,2)
+ var/full_date = time2text(world.timeofday, "DDD, MMM DD of YYYY")
+ var/day_loc = findtext(full_date, time2text(world.timeofday, "DD"))
+ P.timestamp = "[copytext(full_date,1,day_loc)][day_string][copytext(full_date,day_loc+2)]"
infos += P
@@ -1871,6 +1885,7 @@
/datum/player_info/var
author // admin who authored the information
content // text content of the information
+ timestamp // Because this is bloody annoying
/obj/admins/proc/player_has_info(var/key as text)
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
@@ -1896,13 +1911,18 @@
if(!infos)
dat += "No information found on the given key.
"
else
+ var/update_file = 0
var/i = 0
for(var/datum/player_info/I in infos)
i += 1
- dat += "[I.content] by [I.author] "
+ if(!I.timestamp)
+ I.timestamp = "Pre-4/3/2012"
+ update_file = 1
+ dat += "[I.content] by [I.author] on [I.timestamp] "
if(I.author == usr.key)
dat += "Remove"
dat += "
"
+ if(update_file) info << infos
dat += "
"
dat += "Add Comment
"
@@ -1941,6 +1961,7 @@
if(!note_keys)
dat += "No notes found."
else
+ sortList(note_keys)
for(var/t in note_keys)
dat += text("
| [t] |
")
dat += ""
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index 879502d8d33..a2a04b36ee3 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -5,7 +5,7 @@
dat += "| Name/Real Name | Type | Assigned Job | Info | Options | Traitor? |
"
//add IP: | to this if wanting to add back in IP checking
//add (IP: [M.lastKnownIP]) | if you want to know their ip to the lists below
- var/list/mobs = sortmobs()
+ var/list/mobs = get_sorted_mobs()
var/i = 1
for(var/mob/M in mobs)
@@ -45,7 +45,7 @@
else if(istype(M,/mob/new_player))
dat += "New Player | "
else
- dat += "ERROR | "
+ dat += "\red ERROR | \black"
if(M.mind && M.mind.assigned_role && istype(M, /mob/living/carbon/human)) // Adds a column to Player Panel that shows their current job.
var/mob/living/carbon/human/H = M
@@ -117,7 +117,7 @@
dat += "| Name | Real Name | Assigned Job | Key | Options | PM | Traitor? |
"
//add IP: | to this if wanting to add back in IP checking
//add (IP: [M.lastKnownIP]) | if you want to know their ip to the lists below
- var/list/mobs = sortmobs()
+ var/list/mobs = get_sorted_mobs()
for(var/mob/M in mobs)
if(!M.ckey) continue
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index 30fa62e440f..50a8188941a 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -37,7 +37,7 @@
return
if(config.allow_admin_jump)
- var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortmobs()
+ var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in getmobs()
var/mob/M = selection
if(!istype(M))
return
@@ -82,7 +82,7 @@
src << "Only administrators may use this command."
return
if(config.allow_admin_jump)
- var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortmobs()
+ var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in getmobs()
var/mob/M = selection
if(!istype(M))
return
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 07448d60fe2..9b49845c316 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -50,7 +50,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if("Obj")
target = input("Enter target:","Target",usr) as obj in world
if("Mob")
- target = input("Enter target:","Target",usr) as mob in sortmobs()
+ target = input("Enter target:","Target",usr) as mob in getmobs()
if("Area or Turf")
target = input("Enter target:","Target",usr.loc) as area|turf in world
if("Client")
@@ -105,7 +105,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
lst[i] = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
- lst[i] = input("Select reference:","Reference",usr) as mob in sortmobs()
+ lst[i] = input("Select reference:","Reference",usr) as mob in getmobs()
if("file")
lst[i] = input("Pick file:","File") as file
@@ -121,7 +121,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
lst[i] = input("Please, select a player!", "Selection", null, null) as null|anything in keys
if("mob's area")
- var/mob/temp = input("Select mob", "Selection", usr) as mob in sortmobs()
+ var/mob/temp = input("Select mob", "Selection", usr) as mob in getmobs()
lst[i] = temp.loc
diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm
index 8ba910f2eb0..e4e2a144df0 100644
--- a/code/modules/admin/verbs/modifyvariables.dm
+++ b/code/modules/admin/verbs/modifyvariables.dm
@@ -62,7 +62,7 @@
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
- var_value = input("Select reference:","Reference") as null|mob in sortmobs()
+ var_value = input("Select reference:","Reference") as null|mob in get_sorted_mobs()
if("file")
var_value = input("Pick file:","File") as null|file
@@ -99,10 +99,10 @@
switch(class)
if("text")
- var_value = input("Enter new text:","Text") as text
+ var_value = input("Enter new text:","Text") as null|text
if("num")
- var_value = input("Enter new number:","Num") as num
+ var_value = input("Enter new number:","Num") as null|num
if("type")
var_value = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
@@ -127,13 +127,13 @@
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
- var_value = input("Select reference:","Reference") as mob in sortmobs()
+ var_value = input("Select reference:","Reference") as null|mob in get_sorted_mobs()
if("file")
- var_value = input("Pick file:","File") as file
+ var_value = input("Pick file:","File") as null|file
if("icon")
- var_value = input("Pick icon:","Icon") as icon
+ var_value = input("Pick icon:","Icon") as null|icon
if("marked datum")
var_value = holder.marked_datum
@@ -263,11 +263,11 @@
if("text")
variable = input("Enter new text:","Text",\
- variable) as text
+ variable) as null|text
if("num")
variable = input("Enter new number:","Num",\
- variable) as num
+ variable) as null|num
if("type")
variable = input("Enter type:","Type",variable) \
@@ -276,7 +276,7 @@
if("reference")
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
if("Specifc UID (Hexadecimal number)")
- var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
+ var/UID = input("Type in UID, without the leading 0x","Type in UID") as null|text
if(!UID) return
if(length(UID) != 7)
usr << "ERROR. UID must be 7 digits"
@@ -294,15 +294,15 @@
if("mob reference")
variable = input("Select reference:","Reference",\
- variable) as mob in sortmobs()
+ variable) as null|mob in get_sorted_mobs()
if("file")
variable = input("Pick file:","File",variable) \
- as file
+ as null|file
if("icon")
variable = input("Pick icon:","Icon",variable) \
- as icon
+ as null|icon
if("marked datum")
variable = holder.marked_datum
@@ -533,7 +533,7 @@
O.vars[variable] = var_new
if("mob reference")
- var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in sortmobs()
+ var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in get_sorted_mobs()
if(var_new==null) return
O.vars[variable] = var_new
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index d3f977df8d1..1b57726d946 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -54,7 +54,7 @@
t_his = "her"
t_him = "her"
- msg += "\a [src]!\n"
+ msg += "\a [src][examine_text ? ", [examine_text]":""]!\n"
//uniform
if (src.w_uniform && !skipjumpsuit)
@@ -237,10 +237,12 @@
var/list/wound_descriptions = list()
var/list/wound_flavor_text = list()
+ var/list/is_destroyed = list()
for(var/named in organs)
var/datum/organ/external/temp = organs[named]
if(temp)
if(temp.destroyed)
+ is_destroyed["[temp.display_name]"] = 1
wound_flavor_text["[temp.display_name]"] = "[t_He] is missing [t_his] [temp.display_name].\n"
continue
if(temp.wounds)
@@ -401,14 +403,14 @@
switch(tally[tallied])
if(1)
if(!flavor_text.len)
- flavor_text += "\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
+ flavor_text += "\The [src] has[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
else
- flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
+ flavor_text += "[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]"
if(2)
if(!flavor_text.len)
- flavor_text += "\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
+ flavor_text += "\The [src] has[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
else
- flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
+ flavor_text += "[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s"
if(3 to 5)
if(!flavor_text.len)
flavor_text += "\The [src] has several [tallied_rename[tallied]]s"
@@ -429,47 +431,50 @@
flavor_text_string += flavor_text[text]
flavor_text_string += " on [t_his] [named].
"
wound_flavor_text["[named]"] = flavor_text_string
- if(wound_flavor_text["head"] && !skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))
+
+ //Handles the text strings being added to the actual description.
+ //If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
+ if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))))
msg += wound_flavor_text["head"]
else if(is_bleeding["head"])
msg += "[src] has blood running down [t_his] face!\n"
- if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit)
+ if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
msg += wound_flavor_text["chest"]
else if(is_bleeding["chest"])
msg += "[src] has blood soaking through from under [t_his] clothing!\n"
- if(wound_flavor_text["left arm"] && !w_uniform && !skipjumpsuit)
+ if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left arm"]
else if(is_bleeding["left arm"])
msg += "[src] has blood soaking through from under [t_his] clothing!\n"
- if(wound_flavor_text["left hand"] && !gloves && !skipgloves)
+ if(wound_flavor_text["left hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["left hand"]
else if(is_bleeding["left hand"])
msg += "[src] has blood running from under [t_his] gloves!\n"
- if(wound_flavor_text["right arm"] && !w_uniform && !skipjumpsuit)
+ if(wound_flavor_text["right arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["right arm"]
else if(is_bleeding["right arm"])
msg += "[src] has blood soaking through from under [t_his] clothing!\n"
- if(wound_flavor_text["right hand"] && !gloves && !skipgloves)
+ if(wound_flavor_text["right hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["right hand"]
else if(is_bleeding["right hand"])
msg += "[src] has blood running from under [t_his] gloves!\n"
- if(wound_flavor_text["groin"] && !w_uniform && !skipjumpsuit)
+ if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["groin"]
else if(is_bleeding["groin"])
msg += "[src] has blood soaking through from under [t_his] clothing!\n"
- if(wound_flavor_text["left leg"] && !w_uniform && !skipjumpsuit)
+ if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["left leg"]
else if(is_bleeding["left leg"])
msg += "[src] has blood soaking through from under [t_his] clothing!\n"
- if(wound_flavor_text["left foot"]&& !shoes && !skipshoes)
+ if(wound_flavor_text["left foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["left foot"]
else if(is_bleeding["left foot"])
msg += "[src] has blood running from [t_his] shoes!\n"
- if(wound_flavor_text["right leg"] && !w_uniform && !skipjumpsuit)
+ if(wound_flavor_text["right leg"] && (is_destroyed["right leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["right leg"]
else if(is_bleeding["right leg"])
msg += "[src] has blood soaking through from under [t_his] clothing!\n"
- if(wound_flavor_text["right foot"]&& !shoes && !skipshoes)
+ if(wound_flavor_text["right foot"]&& (is_destroyed["right foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["right foot"]
else if(is_bleeding["right foot"])
msg += "[src] has blood running from [t_his] shoes!\n"
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 07891834222..eb9cdd72bdd 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -60,6 +60,7 @@
var/bloodloss = 0
var/datum/reagents/vessel
var/pale = 0
+ var/examine_text = ""
/mob/living/carbon/human/dummy
real_name = "Test Dummy"
diff --git a/code/modules/mob/living/carbon/metroid/examine.dm b/code/modules/mob/living/carbon/metroid/examine.dm
index 28f2026b034..1b3146d6da1 100644
--- a/code/modules/mob/living/carbon/metroid/examine.dm
+++ b/code/modules/mob/living/carbon/metroid/examine.dm
@@ -26,6 +26,6 @@
if(10)
usr << text("\blue [] seems to have extreme electrical activity inside it!", src.name)
- print_flavor_text()
+ usr << print_flavor_text()
return
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index 8b9bf5aa6af..7fc7c7f34d4 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -418,6 +418,28 @@
return //TODO: DEFERRED
handle_regular_status_updates()
+ var/leg_tally = 2
+ for(var/name in organs)
+ var/datum/organ/external/E = organs[name]
+ E.process()
+ if(E.broken || E.destroyed)
+ if(E.name == "l_hand" || E.name == "l_arm")
+ if(hand && equipped())
+ drop_item()
+ emote("scream")
+ else if(E.name == "r_hand" || E.name == "r_arm")
+ if(!hand && equipped())
+ drop_item()
+ emote("scream")
+ else if(E.name == "l_leg" || E.name == "l_foot" \
+ || E.name == "r_leg" || E.name == "r_foot" && !lying)
+ leg_tally-- // let it fail even if just foot&leg
+
+ // can't stand
+ if(leg_tally == 0 && !paralysis && !(lying || resting))
+ emote("scream")
+ emote("collapse")
+ paralysis = 10
health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index 56b155f934e..9f4e471afd0 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -459,9 +459,9 @@
if(!stand_icon || !lying_icon)
update_body()
- //if(update_icon) // Skie
- // ..()
- // overlays = null
+ if(update_icon) // Skie
+ ..()
+ overlays = null
if (lying)
icon = lying_icon
@@ -912,4 +912,78 @@
UpdateDamageIcon()
else
return 0
- return
\ No newline at end of file
+ return
+
+/mob/living/carbon/monkey/proc/get_damaged_organs(var/brute, var/burn)
+ var/list/datum/organ/external/parts = list()
+ for(var/name in organs)
+ var/datum/organ/external/organ = organs[name]
+ if((brute && organ.brute_dam) || (burn && organ.burn_dam))
+ parts += organ
+ return parts
+
+/mob/living/carbon/monkey/proc/get_damageable_organs()
+ var/list/datum/organ/external/parts = list()
+ for(var/name in organs)
+ var/datum/organ/external/organ = organs[name]
+ if(organ.brute_dam + organ.burn_dam < organ.max_damage)
+ parts += organ
+ return parts
+
+// heal ONE external organ, organ gets randomly selected from damaged ones.
+/mob/living/carbon/monkey/heal_organ_damage(var/brute, var/burn)
+ var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)
+ if(!parts.len)
+ return
+ var/datum/organ/external/picked = pick(parts)
+ picked.heal_damage(brute,burn)
+ updatehealth()
+ UpdateDamageIcon()
+
+// damage ONE external organ, organ gets randomly selected from damaged ones.
+/mob/living/carbon/monkey/take_organ_damage(var/brute, var/burn)
+ var/list/datum/organ/external/parts = get_damageable_organs()
+ if(!parts.len)
+ return
+ var/datum/organ/external/picked = pick(parts)
+ picked.take_damage(brute,burn)
+ updatehealth()
+ UpdateDamageIcon()
+
+// heal MANY external organs, in random order
+/mob/living/carbon/monkey/heal_overall_damage(var/brute, var/burn)
+ var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)
+
+ while(parts.len && (brute>0 || burn>0) )
+ var/datum/organ/external/picked = pick(parts)
+
+ var/brute_was = picked.brute_dam
+ var/burn_was = picked.burn_dam
+
+ picked.heal_damage(brute,burn)
+
+ brute -= (brute_was-picked.brute_dam)
+ burn -= (burn_was-picked.burn_dam)
+
+ parts -= picked
+ updatehealth()
+ UpdateDamageIcon()
+
+// damage MANY external organs, in random order
+/mob/living/carbon/monkey/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
+ var/list/datum/organ/external/parts = get_damageable_organs()
+
+ while(parts.len && (brute>0 || burn>0) )
+ var/datum/organ/external/picked = pick(parts)
+
+ var/brute_was = picked.brute_dam
+ var/burn_was = picked.burn_dam
+
+ picked.take_damage(brute,burn, 0, used_weapon)
+
+ brute -= (picked.brute_dam-brute_was)
+ burn -= (picked.burn_dam-burn_was)
+
+ parts -= picked
+ updatehealth()
+ UpdateDamageIcon()
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index 91ef940604d..09ab709f92a 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -39,7 +39,7 @@
/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
- if(!effect || (blocked >= 2)) return 0
+ if(!effect || (blocked)) return 0
switch(effecttype)
if(STUN)
Stun((effect - (min(effect*getarmor(null, "laser"), effect*(0.75 + (blocked*0.05))))))
diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm
index 1f9498a4bb0..899fa25eb31 100644
--- a/code/modules/mob/living/silicon/ai/examine.dm
+++ b/code/modules/mob/living/silicon/ai/examine.dm
@@ -19,6 +19,6 @@
if (src.stat == 1)
usr << text("\red [] doesn't seem to be responding.", src.name)
- print_flavor_text()
+ usr << print_flavor_text()
return
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/pai/examine.dm b/code/modules/mob/living/silicon/pai/examine.dm
index 66aecc6c66c..26d6bb4bb4e 100644
--- a/code/modules/mob/living/silicon/pai/examine.dm
+++ b/code/modules/mob/living/silicon/pai/examine.dm
@@ -19,6 +19,6 @@
if (src.stat == 1)
usr << text("\red [] doesn't seem to be responding.", src.name)
- print_flavor_text()
+ usr << print_flavor_text()
return
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm
index d1b54407d08..e8b3a2fa807 100644
--- a/code/modules/mob/living/silicon/robot/examine.dm
+++ b/code/modules/mob/living/silicon/robot/examine.dm
@@ -22,6 +22,6 @@
else
usr << "The cover is closed."
- print_flavor_text()
+ usr << print_flavor_text()
return
\ No newline at end of file
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 9b44ca5e1d3..1f0ec2fbb29 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -290,9 +290,9 @@
//Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob.
/mob/proc/remove_from_mob(var/obj/O)
- src.u_equip(O)
- if (src.client)
- src.client.screen -= O
+ u_equip(O)
+ if (client)
+ client.screen -= O
O.layer = initial(O.layer)
O.screen_loc = null
return 1
@@ -398,10 +398,10 @@
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = html_encode(msg)
- src.flavor_text = msg
+ flavor_text = msg
/mob/proc/warn_flavor_changed()
- if(src.flavor_text && src.flavor_text != "") // don't spam people that don't use it!
+ if(flavor_text && flavor_text != "") // don't spam people that don't use it!
src << "OOC Warning:
"
src << "Your flavor text is likely out of date! Change"
@@ -409,9 +409,9 @@
if (flavor_text && flavor_text != "")
var/msg = dd_replacetext(flavor_text, "\n", " ")
if(lentext(msg) <= 40)
- usr << "\blue [msg]"
+ return "\blue [msg]"
else
- usr << "\blue [copytext(msg, 1, 37)]... More..."
+ return "\blue [copytext(msg, 1, 37)]... More..."
/*
@@ -610,7 +610,7 @@
src << browse(null, t1)
if(href_list["teleto"])
- src.client.jumptoturf(locate(href_list["teleto"]))
+ client.jumptoturf(locate(href_list["teleto"]))
if(href_list["priv_msg"])
var/mob/M = locate(href_list["priv_msg"])
@@ -648,8 +648,8 @@
if(K.client && K.client.holder && K.key != usr.key && K.key != M.key)
K << "PM: [key_name(usr, K)]->[key_name(M, K)]: \blue [t]"
if(href_list["flavor_more"])
- usr << browse(text("[][]", src.name, dd_replacetext(src.flavor_text, "\n", "
")), text("window=[];size=500x200", src.name))
- onclose(usr, "[src.name]")
+ usr << browse(text("[][]", name, dd_replacetext(flavor_text, "\n", "
")), text("window=[];size=500x200", name))
+ onclose(usr, "[name]")
if(href_list["flavor_change"])
update_flavor_text()
..()
@@ -659,9 +659,9 @@
return health
/mob/proc/UpdateLuminosity()
- if(src.total_luminosity == src.last_luminosity) return 0//nothing to do here
- src.last_luminosity = src.total_luminosity
- sd_SetLuminosity(min(src.total_luminosity,7))//Current hardcode max at 7, should likely be a const somewhere else
+ if(total_luminosity == last_luminosity) return 0//nothing to do here
+ last_luminosity = total_luminosity
+ sd_SetLuminosity(min(total_luminosity,7))//Current hardcode max at 7, should likely be a const somewhere else
return 1
/mob/MouseDrop(mob/M as mob)
@@ -722,7 +722,7 @@
del(src)
*/
- if(IsGuestKey(src.key))
+ if(IsGuestKey(key))
alert(src,"Baystation12 doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
del(src)
@@ -837,7 +837,7 @@ Currently doesn't work, but should be useful later or at least as a template
else
gibs(loc, viruses, dna)
sleep(15)
- for(var/obj/item/I in src.contents)
+ for(var/obj/item/I in contents)
I.loc = get_turf(src)
if(ex_act)
I.ex_act(ex_act)
@@ -876,7 +876,7 @@ Dusting robots does not eject the MMI, so it's a bit more powerful than gib() /N
sleep(15)
if(isrobot(src)&&src:mmi)//Is a robot and it has an mmi.
del(src:mmi)//Delete the MMI first so that it won't go popping out.
- for(var/obj/item/I in src.contents)
+ for(var/obj/item/I in contents)
I.loc = get_turf(src)
del(src)
@@ -1011,17 +1011,17 @@ note dizziness decrements automatically in the mob's Life() proc.
boom.icon_state = "loss_general"
#elif
/client/proc/station_explosion_cinematic(var/derp)
- if(!src.mob)
+ if(!mob)
return
- var/mob/M = src.mob
+ var/mob/M = mob
M.loc = null // HACK, but whatever, this works
if(!M.hud_used)
return
var/obj/screen/boom = M.hud_used.station_explosion
- src.screen += boom
+ screen += boom
if(ticker)
switch(ticker.mode.name)
if("nuclear emergency")
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 8abee2c7478..8454bc7d222 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -311,7 +311,7 @@ the mob is also allowed to move without any sort of restriction. For instance, i
//src.virus.cure(0)
var/datum/disease/v = new virus.type
- src.viruses += v
+ viruses += v
v.affected_mob = src
v.strain_data = v.strain_data.Copy()
v.holder = src
@@ -319,7 +319,7 @@ the mob is also allowed to move without any sort of restriction. For instance, i
v.carrier = 1
return
- //if(src.virus) //
+ //if(virus) //
//return //
@@ -463,7 +463,7 @@ the mob is also allowed to move without any sort of restriction. For instance, i
return
else*/
var/datum/disease/v = new virus.type
- src.viruses += v
+ viruses += v
v.affected_mob = src
v.strain_data = v.strain_data.Copy()
v.holder = src
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 5bee5a29918..e3d151d2ba7 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -320,19 +320,19 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
/mob/proc/abiotic(var/full_body = 0)
- if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask)))
+ if(full_body && ((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract )) || (back || wear_mask)))
return 1
- if((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )))
+ if((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract )))
return 1
return 0
/mob/proc/abiotic2(var/full_body2 = 0)
- if(full_body2 && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask)))
+ if(full_body2 && ((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract )) || (back || wear_mask)))
return 1
- if((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )))
+ if((l_hand && !( l_hand.abstract )) || (r_hand && !( r_hand.abstract )))
return 1
return 0
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index bb80c607407..5d9fb6c4f70 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -332,7 +332,7 @@
for(var/turf/turf in oview(1,src))
if(istype(turf,/turf/space))
continue
- if(istype(turf,/turf/simulated/floor) && (src.flags & NOGRAV))
+ if(istype(turf,/turf/simulated/floor) && (flags & NOGRAV))
continue
dense_object++
break