mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
swap bodypart species checking to bitmap, fix surgery for monkey body… (#60280)
* swap bodypart species checking to bitmap, fix surgery for monkey bodyparts on monkeys * fix part_origin so it is used correctly * remove tabs, change DEFAULT_BODY to NULL_BODY * add requested documentation Co-authored-by: whitecas18 <whitecas18@students.ecu.edu>
This commit is contained in:
@@ -62,6 +62,8 @@
|
||||
|
||||
///for nonhuman bodypart (e.g. monkey)
|
||||
var/animal_origin
|
||||
//for all bodyparts
|
||||
var/part_origin = HUMAN_BODY
|
||||
///whether it can be dismembered with a weapon.
|
||||
var/dismemberable = 1
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
icon = 'icons/mob/animal_parts.dmi'
|
||||
icon_state = "default_monkey_chest"
|
||||
animal_origin = MONKEY_BODYPART
|
||||
part_origin = MONKEY_BODY
|
||||
wound_resistance = -10
|
||||
|
||||
/obj/item/bodypart/chest/alien
|
||||
@@ -41,6 +42,7 @@
|
||||
dismemberable = 0
|
||||
max_damage = 500
|
||||
animal_origin = ALIEN_BODYPART
|
||||
part_origin = ALIEN_BODY
|
||||
|
||||
/obj/item/bodypart/chest/larva
|
||||
icon = 'icons/mob/animal_parts.dmi'
|
||||
@@ -48,6 +50,7 @@
|
||||
dismemberable = 0
|
||||
max_damage = 50
|
||||
animal_origin = LARVA_BODYPART
|
||||
part_origin = LARVA_BODY
|
||||
|
||||
/obj/item/bodypart/l_arm
|
||||
name = "left arm"
|
||||
@@ -132,6 +135,7 @@
|
||||
icon = 'icons/mob/animal_parts.dmi'
|
||||
icon_state = "default_monkey_l_arm"
|
||||
animal_origin = MONKEY_BODYPART
|
||||
part_origin = MONKEY_BODY
|
||||
wound_resistance = -10
|
||||
px_x = -5
|
||||
px_y = -3
|
||||
@@ -145,6 +149,7 @@
|
||||
can_be_disabled = FALSE
|
||||
max_damage = 100
|
||||
animal_origin = ALIEN_BODYPART
|
||||
part_origin = ALIEN_BODY
|
||||
|
||||
/obj/item/bodypart/r_arm
|
||||
name = "right arm"
|
||||
@@ -227,6 +232,7 @@
|
||||
icon = 'icons/mob/animal_parts.dmi'
|
||||
icon_state = "default_monkey_r_arm"
|
||||
animal_origin = MONKEY_BODYPART
|
||||
part_origin = MONKEY_BODY
|
||||
wound_resistance = -10
|
||||
px_x = 5
|
||||
px_y = -3
|
||||
@@ -240,6 +246,8 @@
|
||||
can_be_disabled = FALSE
|
||||
max_damage = 100
|
||||
animal_origin = ALIEN_BODYPART
|
||||
part_origin = ALIEN_BODY
|
||||
|
||||
|
||||
/obj/item/bodypart/l_leg
|
||||
name = "left leg"
|
||||
@@ -317,6 +325,7 @@
|
||||
icon = 'icons/mob/animal_parts.dmi'
|
||||
icon_state = "default_monkey_l_leg"
|
||||
animal_origin = MONKEY_BODYPART
|
||||
part_origin = MONKEY_BODY
|
||||
wound_resistance = -10
|
||||
px_y = 4
|
||||
|
||||
@@ -329,6 +338,7 @@
|
||||
can_be_disabled = FALSE
|
||||
max_damage = 100
|
||||
animal_origin = ALIEN_BODYPART
|
||||
part_origin = ALIEN_BODY
|
||||
|
||||
/obj/item/bodypart/r_leg
|
||||
name = "right leg"
|
||||
@@ -408,6 +418,7 @@
|
||||
icon = 'icons/mob/animal_parts.dmi'
|
||||
icon_state = "default_monkey_r_leg"
|
||||
animal_origin = MONKEY_BODYPART
|
||||
part_origin = MONKEY_BODY
|
||||
wound_resistance = -10
|
||||
px_y = 4
|
||||
|
||||
@@ -420,3 +431,4 @@
|
||||
can_be_disabled = FALSE
|
||||
max_damage = 100
|
||||
animal_origin = ALIEN_BODYPART
|
||||
part_origin = ALIEN_BODY
|
||||
|
||||
@@ -42,17 +42,13 @@
|
||||
tool = organ_storage_contents
|
||||
if(istype(tool, /obj/item/bodypart))
|
||||
var/obj/item/bodypart/bodypart_to_attach = tool
|
||||
if(ismonkey(target))// monkey patient only accept organic monkey limbs
|
||||
if(bodypart_to_attach.status == BODYPART_ROBOTIC || bodypart_to_attach.animal_origin != MONKEY_BODYPART)
|
||||
to_chat(user, span_warning("[bodypart_to_attach] doesn't match the patient's morphology."))
|
||||
return -1
|
||||
if(bodypart_to_attach.status != BODYPART_ROBOTIC)
|
||||
organ_rejection_dam = 10
|
||||
if(ishuman(target))
|
||||
if(bodypart_to_attach.animal_origin)
|
||||
var/mob/living/carbon/human/human_target = target
|
||||
if(!(bodypart_to_attach.part_origin & human_target.dna.species.allowed_animal_origin))
|
||||
to_chat(user, span_warning("[bodypart_to_attach] doesn't match the patient's morphology."))
|
||||
return -1
|
||||
var/mob/living/carbon/human/human_target = target
|
||||
if(human_target.dna.species.id != bodypart_to_attach.species_id)
|
||||
organ_rejection_dam = 30
|
||||
|
||||
|
||||
Reference in New Issue
Block a user