Makes smaller mobs have smaller organs

This commit is contained in:
HarpyEagle
2016-06-08 14:50:49 -04:00
committed by Yoshax
parent cf76d6dac4
commit f0c8e0e516
5 changed files with 8 additions and 2 deletions

View File

@@ -190,6 +190,7 @@
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
H.mob_size = mob_size
for(var/obj/item/organ/organ in H.contents)
if((organ in H.organs) || (organ in H.internal_organs))
qdel(organ)
@@ -249,7 +250,6 @@
H.mob_swap_flags = swap_flags
H.mob_push_flags = push_flags
H.pass_flags = pass_flags
H.mob_size = mob_size
/datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns).
return

View File

@@ -372,7 +372,7 @@
//returns the number of size categories between affecting and assailant, rounded. Positive means A is larger than B
/obj/item/weapon/grab/proc/size_difference(mob/A, mob/B)
return round(log(2, A.mob_size/B.mob_size), 1)
return mob_size_difference(A.mob_size, B.mob_size)
/obj/item/weapon/grab
var/destroying = 0

View File

@@ -5,6 +5,9 @@
return L.mob_size <= MOB_SMALL
return 0
//returns the number of size categories between two mob_sizes, rounded. Positive means A is larger than B
/proc/mob_size_difference(var/mob_size_A, var/mob_size_B)
return round(log(2, mob_size_A/mob_size_B), 1)
/proc/istiny(A)
if(A && istype(A, /mob/living))

View File

@@ -50,6 +50,7 @@ var/list/organ_cache = list()
max_damage = min_broken_damage * 2
if(istype(holder))
src.owner = holder
src.w_class = max(src.w_class + mob_size_difference(holder.mob_size, MOB_MEDIUM), 1) //smaller mobs have smaller organs.
species = all_species["Human"]
if(holder.dna)
dna = holder.dna.Clone()

View File

@@ -2,6 +2,8 @@
ORGAN DEFINES
****************************************************/
//Make sure that w_class is set as if the parent mob was medium sized! This is because w_class is adjusted automatically for mob_size in New()
/obj/item/organ/external/chest
name = "upper body"
organ_tag = BP_TORSO