More work on severing, improvements to yank-out-object.

This commit is contained in:
Zuhayr
2015-03-27 17:51:10 +10:30
parent aa6439096c
commit c5d42f3a4b
9 changed files with 27 additions and 103 deletions

View File

@@ -156,7 +156,6 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
preview_icon.Blend(temp, ICON_OVERLAY)
for(var/obj/item/organ/external/E in H.organs)
if(E.status & ORGAN_CUT_AWAY || E.status & ORGAN_DESTROYED) continue
temp = new /icon(icobase, "[E.name]")
if(E.status & ORGAN_ROBOT)
temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))

View File

@@ -181,6 +181,8 @@ REAGENT SCANNER
var/mob/living/carbon/human/H = M
for(var/name in H.organs_by_name)
var/obj/item/organ/external/e = H.organs_by_name[name]
if(!e)
continue
var/limb = e.name
if(e.status & ORGAN_BROKEN)
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED)))

View File

@@ -20,79 +20,9 @@
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src)
//BS12 EDIT
/* // All cult functionality moved to Null Rod
/obj/item/weapon/storage/bible/proc/bless(mob/living/carbon/M as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/heal_amt = 10
for(var/obj/item/organ/external/affecting in H.organs)
if(affecting.heal_damage(heal_amt, heal_amt))
H.UpdateDamageIcon()
return
/obj/item/weapon/storage/bible/attack(mob/living/M as mob, mob/living/user as mob)
var/chaplain = 0
if(user.mind && (user.mind.assigned_role == "Chaplain"))
chaplain = 1
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"
return
if(!chaplain)
user << "\red The book sizzles in your hands."
user.take_organ_damage(0,10)
return
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
user.Paralyse(20)
return
// if(..() == BLOCKED)
// return
if (M.stat !=2)
if(M.mind && (M.mind.assigned_role == "Chaplain"))
user << "\red You can't heal yourself!"
return
/*if((M.mind in ticker.mode.cult) && (prob(20)))
M << "\red The power of [src.deity_name] clears your mind of heresy!"
user << "\red You see how [M]'s eyes become clear, the cult no longer holds control over him!"
ticker.mode.remove_cultist(M.mind)*/
if ((istype(M, /mob/living/carbon/human) && prob(60)))
bless(M)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] heals [] with the power of [src.deity_name]!</B>", user, M), 1)
M << "\red May the power of [src.deity_name] compel you to be healed!"
playsound(src.loc, "punch", 25, 1, -1)
else
if(ishuman(M) && !istype(M:head, /obj/item/clothing/head/helmet))
M.adjustBrainLoss(10)
M << "\red You feel dumber."
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] beats [] over the head with []!</B>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
else if(M.stat == 2)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] smacks []'s lifeless corpse with [].</B>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
return
*/
/obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
/* if (istype(A, /turf/simulated/floor))
user << "\blue You hit the floor with the bible."
if(user.mind && (user.mind.assigned_role == "Chaplain"))
call(/obj/effect/rune/proc/revealrunes)(src)*/
if(user.mind && (user.mind.assigned_role == "Chaplain"))
if(A.reagents && A.reagents.has_reagent("water")) //blesses all the water in the holder
user << "\blue You bless [A]."

View File

@@ -5,11 +5,11 @@
health = maxHealth
stat = CONSCIOUS
return
var/total_burn = 0
var/total_brute = 0
var/total_burn = 0
var/total_brute = 0
for(var/obj/item/organ/external/O in organs) //hardcoded to streamline things a bit
total_brute += O.brute_dam
total_burn += O.burn_dam
total_brute += O.brute_dam
total_burn += O.burn_dam
var/oxy_l = ((species.flags & NO_BREATHE) ? 0 : getOxyLoss())
var/tox_l = ((species.flags & NO_POISON) ? 0 : getToxLoss())

View File

@@ -254,16 +254,9 @@ var/global/list/damage_icon_parts = list()
var/icon/base_icon
if(human_icon_cache[icon_key])
//Icon is cached, use existing icon.
base_icon = human_icon_cache[icon_key]
//log_debug("Retrieved cached mob icon ([icon_key] \icon[human_icon_cache[icon_key]]) for [src].")
else
//BEGIN CACHED ICON GENERATION.
//Robotic limbs are handled in get_icon() so all we worry about are missing or dead limbs.
//No icon stored, so we need to start with a basic one.
var/obj/item/organ/external/chest = get_organ("chest")
base_icon = chest.get_icon()
@@ -296,7 +289,7 @@ var/global/list/damage_icon_parts = list()
base_icon.MapColors(rgb(tone[1],0,0),rgb(0,tone[2],0),rgb(0,0,tone[3]))
//Handle husk overlay.
if(husk && ("overlay_husk" in icon_states(race_icon)))
if(husk && ("overlay_husk" in icon_states(species.icobase)))
var/icon/mask = new(base_icon)
var/icon/husk_over = new(species.icobase,"overlay_husk")
mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0)

View File

@@ -1140,6 +1140,8 @@ mob/proc/yank_out_object()
human_user.bloody_hands(H)
selection.loc = get_turf(src)
if(!(U.l_hand && U.r_hand))
U.put_in_hands(selection)
for(var/obj/item/weapon/O in pinned)
if(O == selection)

View File

@@ -627,14 +627,27 @@ Note that amputating the affected organ does in fact remove the infection from t
src.removed(null, ignore_children)
wounds.Cut()
if(parent)
var/datum/wound/W
if(max_damage < 50)
W = new/datum/wound/lost_limb/small(max_damage)
else
W = new/datum/wound/lost_limb(max_damage)
parent.children -= src
if(!clean)
new /obj/item/organ/external/stump(owner, 0, src)
if(clean)
parent.wounds |= W
parent.update_damages()
else
var/obj/item/organ/external/stump/stump = new (owner, 0, src)
stump.wounds |= W
owner.organs |= stump
stump.update_damages()
parent = null
update_health()
owner.update_body()
dir = SOUTH
switch(disintegrate)
if(0)

View File

@@ -16,20 +16,6 @@
if(istype(limb))
max_damage = limb.max_damage
/obj/item/organ/external/stump/process()
damage = max_damage
/obj/item/organ/external/stump/handle_rejection()
return
/obj/item/organ/external/stump/rejuvenate()
return
/obj/item/organ/external/stump/is_damaged()
return 1
/obj/item/organ/external/stump/is_bruised()
return 1
/obj/item/organ/external/stump/is_broken()
return 1
/obj/item/organ/external/stump/removed()
..()
del(src)

View File

@@ -89,7 +89,6 @@ mob/living/carbon/human/proc/handle_pain()
var/maxdam = 0
var/obj/item/organ/external/damaged_organ = null
for(var/obj/item/organ/external/E in organs)
// amputated limbs don't cause pain
if(E.status & ORGAN_DEAD) continue
var/dam = E.get_damage()
// make the choice of the organ depend on damage,