This commit is contained in:
Timothy Teakettle
2020-10-26 20:33:46 +00:00
parent 4e6146898c
commit f468e4940a
2 changed files with 10 additions and 8 deletions

View File

@@ -699,11 +699,13 @@
//new size detected
holder.resize = features["body_size"] / old_size
holder.update_transform()
var/penalty_threshold = CONFIG_GET(number/threshold_body_size_penalty)
if(features["body_size"] < penalty_threshold && old_size >= penalty_threshold)
holder.maxhealth -= 10 //reduce the maxhealth
else
if(old_size < penalty_threshold && features["body_size"] >= penalty_threshold)
holder.maxhealth += 10 //give the maxhealth back
if(iscarbon(holder))
var/mob/living/carbon/C = holder
var/penalty_threshold = CONFIG_GET(number/threshold_body_size_penalty)
if(features["body_size"] < penalty_threshold && old_size >= penalty_threshold)
C.maxHealth -= 10 //reduce the maxhealth
else
if(old_size < penalty_threshold && features["body_size"] >= penalty_threshold)
C.maxHealth += 10 //give the maxhealth back