Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit28
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
var/held_index = 0 //are we a hand? if so, which one!
|
||||
var/is_pseudopart = FALSE //For limbs that don't really exist, eg chainsaws
|
||||
|
||||
var/disabled = FALSE //If TRUE, limb is as good as missing
|
||||
var/disabled = BODYPART_NOT_DISABLED //If disabled, limb is as good as missing
|
||||
var/body_damage_coeff = 1 //Multiplier of the limb's damage that gets applied to the mob
|
||||
var/stam_damage_coeff = 0.5
|
||||
var/brutestate = 0
|
||||
@@ -189,7 +189,7 @@
|
||||
if(stamina > DAMAGE_PRECISION)
|
||||
owner.update_stamina()
|
||||
consider_processing()
|
||||
check_disabled()
|
||||
update_disabled()
|
||||
return update_bodypart_damage_state()
|
||||
|
||||
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
|
||||
@@ -209,7 +209,7 @@
|
||||
if(owner && updating_health)
|
||||
owner.updatehealth()
|
||||
consider_processing()
|
||||
check_disabled()
|
||||
update_disabled()
|
||||
return update_bodypart_damage_state()
|
||||
|
||||
//Returns total damage.
|
||||
@@ -220,7 +220,24 @@
|
||||
return total
|
||||
|
||||
//Checks disabled status thresholds
|
||||
/obj/item/bodypart/proc/check_disabled()
|
||||
|
||||
//Checks disabled status thresholds
|
||||
/obj/item/bodypart/proc/update_disabled()
|
||||
set_disabled(is_disabled())
|
||||
|
||||
/obj/item/bodypart/proc/is_disabled()
|
||||
if(HAS_TRAIT(owner, TRAIT_PARALYSIS))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
if(can_dismember() && !HAS_TRAIT(owner, TRAIT_NODISMEMBER))
|
||||
. = disabled //inertia, to avoid limbs healing 0.1 damage and being re-enabled
|
||||
if((get_damage(TRUE) >= max_damage))
|
||||
return BODYPART_DISABLED_DAMAGE
|
||||
if(disabled && (get_damage(TRUE) <= (max_damage * 0.5)))
|
||||
return BODYPART_NOT_DISABLED
|
||||
else
|
||||
return BODYPART_NOT_DISABLED
|
||||
|
||||
/obj/item/bodypart/proc/check_disabled() //This might be depreciated and should be safe to remove.
|
||||
if(!can_dismember() || HAS_TRAIT(owner, TRAIT_NODISMEMBER))
|
||||
return
|
||||
if(!disabled && (get_damage(TRUE) >= max_damage))
|
||||
@@ -228,7 +245,8 @@
|
||||
else if(disabled && (get_damage(TRUE) <= (max_damage * 0.5)))
|
||||
set_disabled(FALSE)
|
||||
|
||||
/obj/item/bodypart/proc/set_disabled(new_disabled = TRUE)
|
||||
|
||||
/obj/item/bodypart/proc/set_disabled(new_disabled)
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
disabled = new_disabled
|
||||
@@ -546,6 +564,11 @@
|
||||
max_stamina_damage = 200
|
||||
var/obj/item/cavity_item
|
||||
|
||||
/obj/item/bodypart/chest/can_dismember(obj/item/I)
|
||||
if(!((owner.stat == DEAD) || owner.InFullCritical()))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/bodypart/chest/Destroy()
|
||||
if(cavity_item)
|
||||
qdel(cavity_item)
|
||||
@@ -601,13 +624,27 @@
|
||||
px_y = 0
|
||||
stam_heal_tick = 2
|
||||
|
||||
/obj/item/bodypart/l_arm/set_disabled(new_disabled = TRUE)
|
||||
..()
|
||||
if(disabled)
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
owner.emote("scream")
|
||||
/obj/item/bodypart/l_arm/is_disabled()
|
||||
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_ARM))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
return ..()
|
||||
|
||||
/obj/item/bodypart/l_arm/set_disabled(new_disabled)
|
||||
. = ..()
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
||||
if(owner.stat > UNCONSCIOUS)
|
||||
owner.emote("scream")
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
if(held_index)
|
||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||
if(held_index)
|
||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
||||
if(owner.hud_used)
|
||||
var/obj/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"]
|
||||
if(L)
|
||||
@@ -652,18 +689,33 @@
|
||||
stam_heal_tick = 2
|
||||
max_stamina_damage = 50
|
||||
|
||||
/obj/item/bodypart/r_arm/set_disabled(new_disabled = TRUE)
|
||||
..()
|
||||
if(disabled)
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
owner.emote("scream")
|
||||
/obj/item/bodypart/r_arm/is_disabled()
|
||||
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_ARM))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
return ..()
|
||||
|
||||
/obj/item/bodypart/r_arm/set_disabled(new_disabled)
|
||||
. = ..()
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
||||
if(owner.stat > UNCONSCIOUS)
|
||||
owner.emote("scream")
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
if(held_index)
|
||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||
if(held_index)
|
||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
||||
if(owner.hud_used)
|
||||
var/obj/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"]
|
||||
if(R)
|
||||
R.update_icon()
|
||||
|
||||
|
||||
/obj/item/bodypart/r_arm/monkey
|
||||
icon = 'icons/mob/animal_parts.dmi'
|
||||
icon_state = "default_monkey_r_arm"
|
||||
@@ -700,11 +752,24 @@
|
||||
stam_heal_tick = 2
|
||||
max_stamina_damage = 50
|
||||
|
||||
/obj/item/bodypart/l_leg/set_disabled(new_disabled = TRUE)
|
||||
..()
|
||||
if(disabled)
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
owner.emote("scream")
|
||||
/obj/item/bodypart/l_leg/is_disabled()
|
||||
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_LEG))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
return ..()
|
||||
|
||||
/obj/item/bodypart/l_leg/set_disabled(new_disabled)
|
||||
. = ..()
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
||||
if(owner.stat > UNCONSCIOUS)
|
||||
owner.emote("scream")
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||
|
||||
|
||||
/obj/item/bodypart/l_leg/digitigrade
|
||||
name = "left digitigrade leg"
|
||||
@@ -747,11 +812,23 @@
|
||||
max_stamina_damage = 50
|
||||
stam_heal_tick = 2
|
||||
|
||||
/obj/item/bodypart/r_leg/set_disabled(new_disabled = TRUE)
|
||||
..()
|
||||
if(disabled)
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
owner.emote("scream")
|
||||
/obj/item/bodypart/r_leg/is_disabled()
|
||||
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_LEG))
|
||||
return BODYPART_DISABLED_PARALYSIS
|
||||
return ..()
|
||||
|
||||
/obj/item/bodypart/r_leg/set_disabled(new_disabled)
|
||||
. = ..()
|
||||
if(disabled == new_disabled)
|
||||
return
|
||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
||||
if(owner.stat > UNCONSCIOUS)
|
||||
owner.emote("scream")
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
||||
if(. && (owner.stat > DEAD))
|
||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||
|
||||
/obj/item/bodypart/r_leg/digitigrade
|
||||
name = "right digitigrade leg"
|
||||
|
||||
@@ -129,11 +129,14 @@
|
||||
holder = null
|
||||
if(contents.len == 1)
|
||||
Extend(contents[1])
|
||||
else // TODO: make it similar to borg's storage-like module selection
|
||||
var/obj/item/choise = input("Activate which item?", "Arm Implant", null, null) as null|anything in items_list
|
||||
if(owner && owner == usr && owner.stat != DEAD && (src in owner.internal_organs) && !holder && istype(choise) && (choise in contents))
|
||||
// This monster sanity check is a nice example of how bad input() is.
|
||||
Extend(choise)
|
||||
else
|
||||
var/list/choice_list = list()
|
||||
for(var/obj/item/I in items_list)
|
||||
choice_list[I] = getFlatIcon(I)
|
||||
var/obj/item/choice = show_radial_menu(owner, owner, choice_list)
|
||||
if(owner && owner == usr && owner.stat != DEAD && (src in owner.internal_organs) && !holder && (choice in contents))
|
||||
// This monster sanity check is a nice example of how bad input is.
|
||||
Extend(choice)
|
||||
else
|
||||
Retract()
|
||||
|
||||
|
||||
@@ -94,3 +94,9 @@
|
||||
H.dna.features["ears"] = "None"
|
||||
H.dna.species.mutant_bodyparts -= "ears"
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/ears/bronze
|
||||
name = "tin ears"
|
||||
desc = "The robust ears of a bronze golem. "
|
||||
damage_multiplier = 0.1 //STRONK
|
||||
bang_protect = 1 //Fear me weaklings.
|
||||
|
||||
Reference in New Issue
Block a user