Made it so prosthetics can't replace legs. Compiled and tested.

This commit is contained in:
Fermi
2019-06-02 18:40:56 +01:00
parent a1e92ce654
commit 59e5372abd
3 changed files with 8 additions and 2 deletions
+1
View File
@@ -78,6 +78,7 @@
#define TRAIT_CROCRIN_IMMUNE "crocin_immune"
#define TRAIT_NYMPHO "nymphomania"
#define TRAIT_MASO "masochism"
#define TRAIT_PARA "paraplegic"
// common trait sources
#define TRAIT_GENERIC "generic"
+6 -1
View File
@@ -191,6 +191,7 @@
name = "Paraplegic"
desc = "Your legs do not function. Nothing will ever fix this. But hey, free wheelchair!"
value = -3
mob_trait = TRAIT_PARA
human_only = TRUE
gain_text = null // Handled by trauma.
lose_text = null
@@ -242,8 +243,12 @@
var/slot_string = "limb"
/datum/quirk/prosthetic_limb/on_spawn()
var/limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
var/mob/living/carbon/human/H = quirk_holder
var/limb_slot
if(H.has_trait("TRAIT_PARA"))//Prevent paraplegic legs being replaced
limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
else
limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
var/obj/item/bodypart/old_part = H.get_bodypart(limb_slot)
var/obj/item/bodypart/prosthetic
switch(limb_slot)
+1 -1
View File
@@ -60,7 +60,7 @@
if(key_type && !is_key(inserted_key))
to_chat(user, "<span class='warning'>[src] has no key inserted!</span>")
return FALSE
if(canmove && (user.get_num_lehs() < legs_required))
if(canmove && (user.get_num_legs() < legs_required))
to_chat(user, "<span class='warning'>You don't have enough legs to operate the pedals!</span>")
canmove = FALSE
addtimer(VARSET_CALLBACK(src, canmove, TRUE), 20)