using quirk susbsysten instead of trats
This commit is contained in:
@@ -78,10 +78,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/list/species_traits = list(HAS_FLESH,HAS_BONE) //by default they can scar and have bones/flesh unless set to something else
|
||||
// generic traits tied to having the species
|
||||
var/list/inherent_traits = list()
|
||||
// blacklisted traits that conflict with species. If i can figure how to use these lists and mass removes, will uncomment
|
||||
//var/list/blacklisted_traits = list()
|
||||
var/inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID
|
||||
|
||||
var/list/blacklisted_quirks = list() // Quirks that will be removed upon gaining this species, to be defined by species
|
||||
|
||||
var/attack_verb = "punch" // punch-specific attack verb
|
||||
var/sound/attack_sound = 'sound/weapons/punch1.ogg'
|
||||
var/sound/miss_sound = 'sound/weapons/punchmiss.ogg'
|
||||
@@ -344,6 +344,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
for(var/X in inherent_traits)
|
||||
ADD_TRAIT(C, X, SPECIES_TRAIT)
|
||||
|
||||
//lets remove those conflicting quirks
|
||||
remove_blacklisted_quirks(C)
|
||||
|
||||
if(TRAIT_VIRUSIMMUNE in inherent_traits)
|
||||
for(var/datum/disease/A in C.diseases)
|
||||
A.cure(FALSE)
|
||||
@@ -426,6 +429,17 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src)
|
||||
|
||||
// shamelessly inspired by antag_datum.remove_blacklisted_quirks()
|
||||
/datum/species/proc/remove_blacklisted_quirks(mob/living/carbon/C)
|
||||
var/mob/living/L = C.mind.current
|
||||
if(istype(L))
|
||||
var/list/my_quirks = L.client?.prefs.all_quirks.Copy()
|
||||
SSquirks.filter_quirks(my_quirks, blacklisted_quirks)
|
||||
for(var/q in L.roundstart_quirks)
|
||||
var/datum/quirk/Q = q
|
||||
if(!(SSquirks.quirk_name_by_path(Q.type) in my_quirks))
|
||||
L.remove_quirk(Q.type)
|
||||
|
||||
/datum/species/proc/handle_hair(mob/living/carbon/human/H, forced_colour)
|
||||
H.remove_overlay(HAIR_LAYER)
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
armor = 20 // 120 damage to KO a zombie, which kills it
|
||||
speedmod = 1.6 // they're very slow
|
||||
mutanteyes = /obj/item/organ/eyes/night_vision/zombie
|
||||
// same as in species.dm
|
||||
//blacklisted_traits = list(TRAIT_PACIFISM)
|
||||
blacklisted_quirks = list(/datum/quirk/nonviolent)
|
||||
var/heal_rate = 1
|
||||
var/regen_cooldown = 0
|
||||
|
||||
@@ -98,10 +97,6 @@
|
||||
part.incoming_stam_mult = incoming_stam_mult
|
||||
//todo: add negative wound resistance to all parts when wounds is merged (zombies are physically weak in terms of limbs)
|
||||
|
||||
// this removes pacifism quirk so our zombie can attack normally. but how to add back when cured?
|
||||
REMOVE_TRAIT(C, TRAIT_PACIFISM, ROUNDSTART_TRAIT) // and why "cannot be removed without admin intervention"? what does that mean?
|
||||
|
||||
|
||||
// Your skin falls off
|
||||
/datum/species/krokodil_addict
|
||||
name = SPECIES_HUMAN
|
||||
|
||||
Reference in New Issue
Block a user