Merge branch 'dev' into aiemergencymessage

This commit is contained in:
Yoshax
2015-04-05 17:39:30 +01:00
93 changed files with 894 additions and 402 deletions
+4 -4
View File
@@ -151,7 +151,7 @@ var/list/slot_equipment_priority = list( \
remove_from_mob(W)
if(!W) return 1 // self destroying objects (tk, grabs)
W.forceMove(Target)
update_icons()
return 1
@@ -173,11 +173,11 @@ var/list/slot_equipment_priority = list( \
/*
Removes the object from any slots the mob might have, calling the appropriate icon update proc.
Does nothing else.
DO NOT CALL THIS PROC DIRECTLY. It is meant to be called only by other inventory procs.
It's probably okay to use it if you are transferring the item between slots on the same mob,
but chances are you're safer calling remove_from_mob() or drop_from_inventory() anyways.
As far as I can tell the proc exists so that mobs with different inventory slots can override
the search through all the slots, without having to duplicate the rest of the item dropping.
*/
@@ -216,7 +216,7 @@ var/list/slot_equipment_priority = list( \
O.screen_loc = null
if(istype(O, /obj/item))
var/obj/item/I = O
I.dropped()
I.dropped(src)
return 1
@@ -2,6 +2,9 @@
name = "brain"
health = 400 //They need to live awhile longer than other organs.
desc = "A piece of juicy meat found in a person's head."
organ_tag = "brain"
parent_organ = "head"
vital = 1
icon_state = "brain2"
force = 1.0
w_class = 2.0
@@ -46,7 +49,7 @@
/obj/item/organ/brain/removed(var/mob/living/user)
..()
name = "[owner.real_name]'s brain"
var/mob/living/simple_animal/borer/borer = owner.has_brain_worms()
@@ -57,6 +60,8 @@
if(istype(B) && istype(owner))
B.transfer_identity(owner)
..()
/obj/item/organ/brain/replaced(var/mob/living/target)
if(target.key)
+4 -5
View File
@@ -31,10 +31,9 @@
var/d = rand(round(I.force / 4), I.force)
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
var/organ = H.get_organ("chest")
if (istype(organ, /obj/item/organ/external))
var/obj/item/organ/external/temp = organ
if(temp.take_damage(d, 0))
var/obj/item/organ/external/organ = H.get_organ("chest")
if (istype(organ))
if(organ.take_damage(d, 0))
H.UpdateDamageIcon()
H.updatehealth()
else
@@ -328,7 +327,7 @@
if(!item) return //Grab processing has a chance of returning null
src.remove_from_mob(item)
item.loc = src.loc
@@ -117,7 +117,7 @@
g_skin = green
b_skin = blue
update_body()
force_update_limbs()
return 1
/mob/living/carbon/human/proc/change_skin_tone(var/tone)
@@ -126,7 +126,7 @@
s_tone = tone
update_body()
force_update_limbs()
return 1
/mob/living/carbon/human/proc/update_dna()
@@ -186,3 +186,8 @@
/proc/q()
var/mob/living/carbon/human/H = usr
H.change_appearance(APPEARANCE_ALL)
/mob/living/carbon/human/proc/force_update_limbs()
for(var/obj/item/organ/external/O in organs)
O.sync_colour_to_human(src)
update_body(0)
+12 -4
View File
@@ -20,6 +20,9 @@
else
set_species()
if(species)
name = species.get_random_name(gender)
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
@@ -326,8 +329,8 @@
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name()
var/obj/item/organ/external/head/head = get_organ("head")
if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
var/obj/item/organ/external/head = get_organ("head")
if(!head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
return "Unknown"
return real_name
@@ -1119,8 +1122,6 @@
species = all_species[new_species]
species.create_organs(src)
if(species.language)
add_language(species.language)
@@ -1137,6 +1138,8 @@
g_skin = 0
b_skin = 0
species.create_organs(src)
species.handle_post_spawn(src)
maxHealth = species.total_health
@@ -1361,3 +1364,8 @@
U << "<span class='danger'>You pop [S]'s [current_limb.joint] back in!</span>"
S << "<span class='danger'>[U] pops your [current_limb.joint] back in!</span>"
current_limb.undislocate()
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W in organs)
return
..()
@@ -227,7 +227,7 @@
chance = !hand ? 40 : 20
if (prob(chance))
visible_message("<spawn class=danger>[src]'s [W] goes off during struggle!")
visible_message("<span class='danger'>[src]'s [W] goes off during struggle!</span>")
var/list/turfs = list()
for(var/turf/T in view())
turfs += T
@@ -192,10 +192,11 @@ This saves us from having to call add_fingerprint() any time something is put in
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
/mob/living/carbon/human/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1)
if(!slot) return
if(!istype(W)) return
if(!has_organ_for_slot(slot)) return
if(!species || !species.hud || !(slot in species.hud.equip_slots)) return
W.loc = src
switch(slot)
if(slot_back)
@@ -314,7 +315,7 @@ This saves us from having to call add_fingerprint() any time something is put in
W.layer = 20
return
return 1
/*
MouseDrop human inventory menu
@@ -45,7 +45,7 @@
"heart" = /obj/item/organ/heart,
"lungs" = /obj/item/organ/lungs,
"liver" = /obj/item/organ/liver,
"kidneys" = /obj/item/organ/kidney,
"kidneys" = /obj/item/organ/kidneys,
"brain" = /obj/item/organ/brain,
"eyes" = /obj/item/organ/eyes,
"stack" = /obj/item/organ/stack/vox
@@ -110,7 +110,7 @@
"heart" = /obj/item/organ/heart,
"lungs" = /obj/item/organ/lungs,
"liver" = /obj/item/organ/liver,
"kidneys" = /obj/item/organ/kidney,
"kidneys" = /obj/item/organ/kidneys,
"brain" = /obj/item/organ/brain,
"appendix" = /obj/item/organ/appendix,
"eyes" = /obj/item/organ/eyes
+5
View File
@@ -967,6 +967,11 @@ default behaviour is:
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
return 0
/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W in internal_organs)
return
..()
/mob/living/carbon/proc/spin(spintime, speed)
spawn()
var/D = dir
@@ -92,6 +92,7 @@
if(health < 1)
death()
return
if(health > maxHealth)
health = maxHealth
+1 -1
View File
@@ -729,7 +729,7 @@ note dizziness decrements automatically in the mob's Life() proc.
stat(null,"Location:\t([x], [y], [z])")
stat(null,"CPU:\t[world.cpu]")
stat(null,"Instances:\t[world.contents.len]")
if(statpanel("Status") && processScheduler.getIsRunning())
if(statpanel("Status") && processScheduler && processScheduler.getIsRunning())
var/datum/controller/process/process
process = processScheduler.getProcess("ticker")
+1
View File
@@ -29,6 +29,7 @@
var/obj/screen/damageoverlay = null
var/obj/screen/pain = null
var/obj/screen/gun/item/item_use_icon = null
var/obj/screen/gun/radio/radio_use_icon = null
var/obj/screen/gun/move/gun_move_icon = null
var/obj/screen/gun/run/gun_run_icon = null
var/obj/screen/gun/mode/gun_setting_icon = null
@@ -473,6 +473,7 @@
//new_character.dna.UpdateSE()
// Do the initial caching of the player's body icons.
new_character.force_update_limbs()
new_character.regenerate_icons()
new_character.key = key //Manually transfer the key to log them in