157 lines
5.3 KiB
Plaintext
157 lines
5.3 KiB
Plaintext
// trait accessor defines
|
|
#define ADD_TRAIT(target, trait, source) \
|
|
do { \
|
|
var/list/_L; \
|
|
if (!target.status_traits) { \
|
|
target.status_traits = list(); \
|
|
_L = target.status_traits; \
|
|
_L[trait] = list(source); \
|
|
} else { \
|
|
_L = target.status_traits; \
|
|
if (_L[trait]) { \
|
|
_L[trait] |= list(source); \
|
|
} else { \
|
|
_L[trait] = list(source); \
|
|
} \
|
|
} \
|
|
} while (0)
|
|
#define REMOVE_TRAIT(target, trait, sources) \
|
|
do { \
|
|
var/list/_L = target.status_traits; \
|
|
var/list/_S; \
|
|
if (sources && !islist(sources)) { \
|
|
_S = list(sources); \
|
|
} else { \
|
|
_S = sources\
|
|
}; \
|
|
if (_L && _L[trait]) { \
|
|
for (var/_T in _L[trait]) { \
|
|
if ((!_S && (_T != ROUNDSTART_TRAIT)) || (_T in _S)) { \
|
|
_L[trait] -= _T \
|
|
} \
|
|
};\
|
|
if (!length(_L[trait])) { \
|
|
_L -= trait \
|
|
}; \
|
|
if (!length(_L)) { \
|
|
target.status_traits = null \
|
|
}; \
|
|
} \
|
|
} while (0)
|
|
#define REMOVE_TRAITS_NOT_IN(target, sources) \
|
|
do { \
|
|
var/list/_L = target.status_traits; \
|
|
var/list/_S = sources; \
|
|
if (_L) { \
|
|
for (var/_T in _L) { \
|
|
_L[_T] &= _S;\
|
|
if (!length(_L[_T])) { \
|
|
_L -= _T } \
|
|
};\
|
|
if (!length(_L)) { \
|
|
target.status_traits = null\
|
|
};\
|
|
}\
|
|
} while (0)
|
|
#define HAS_TRAIT(target, trait) (target.status_traits ? (target.status_traits[trait] ? TRUE : FALSE) : FALSE)
|
|
#define HAS_TRAIT_FROM(target, trait, source) (target.status_traits ? (target.status_traits[trait] ? (source in target.status_traits[trait]) : FALSE) : FALSE)
|
|
|
|
//mob traits
|
|
#define TRAIT_BLIND "blind"
|
|
#define TRAIT_MUTE "mute"
|
|
#define TRAIT_EMOTEMUTE "emotemute"
|
|
#define TRAIT_DEAF "deaf"
|
|
#define TRAIT_NEARSIGHT "nearsighted"
|
|
#define TRAIT_FAT "fat"
|
|
#define TRAIT_HUSK "husk"
|
|
#define TRAIT_NOCLONE "noclone"
|
|
#define TRAIT_CLUMSY "clumsy"
|
|
#define TRAIT_DUMB "dumb"
|
|
#define TRAIT_MONKEYLIKE "monkeylike" //sets IsAdvancedToolUser to FALSE
|
|
#define TRAIT_PACIFISM "pacifism"
|
|
#define TRAIT_IGNORESLOWDOWN "ignoreslow"
|
|
#define TRAIT_GOTTAGOFAST "fast"
|
|
#define TRAIT_GOTTAGOREALLYFAST "2fast"
|
|
#define TRAIT_DEATHCOMA "deathcoma" //Causes death-like unconsciousness
|
|
#define TRAIT_FAKEDEATH "fakedeath" //Makes the owner appear as dead to most forms of medical examination
|
|
#define TRAIT_DISFIGURED "disfigured"
|
|
#define TRAIT_XENO_HOST "xeno_host" //Tracks whether we're gonna be a baby alien's mummy.
|
|
#define TRAIT_STUNIMMUNE "stun_immunity"
|
|
#define TRAIT_SLEEPIMMUNE "sleep_immunity"
|
|
#define TRAIT_PUSHIMMUNE "push_immunity"
|
|
#define TRAIT_SHOCKIMMUNE "shock_immunity"
|
|
#define TRAIT_STABLEHEART "stable_heart"
|
|
#define TRAIT_RESISTHEAT "resist_heat"
|
|
#define TRAIT_RESISTHEATHANDS "resist_heat_handsonly" //For when you want to be able to touch hot things, but still want fire to be an issue.
|
|
#define TRAIT_RESISTCOLD "resist_cold"
|
|
#define TRAIT_RESISTHIGHPRESSURE "resist_high_pressure"
|
|
#define TRAIT_RESISTLOWPRESSURE "resist_low_pressure"
|
|
#define TRAIT_RADIMMUNE "rad_immunity"
|
|
#define TRAIT_VIRUSIMMUNE "virus_immunity"
|
|
#define TRAIT_PIERCEIMMUNE "pierce_immunity"
|
|
#define TRAIT_NODISMEMBER "dismember_immunity"
|
|
#define TRAIT_NOFIRE "nonflammable"
|
|
#define TRAIT_NOGUNS "no_guns"
|
|
#define TRAIT_NOHUNGER "no_hunger"
|
|
#define TRAIT_EASYDISMEMBER "easy_dismember"
|
|
#define TRAIT_LIMBATTACHMENT "limb_attach"
|
|
#define TRAIT_TOXINLOVER "toxinlover"
|
|
#define TRAIT_NOBREATH "no_breath"
|
|
#define TRAIT_ANTIMAGIC "anti_magic"
|
|
#define TRAIT_HOLY "holy"
|
|
#define TRAIT_DEPRESSION "depression"
|
|
#define TRAIT_JOLLY "jolly"
|
|
#define TRAIT_NOCRITDAMAGE "no_crit"
|
|
#define TRAIT_NOSLIPWATER "noslip_water"
|
|
#define TRAIT_NOSLIPALL "noslip_all"
|
|
#define TRAIT_NODEATH "nodeath"
|
|
#define TRAIT_NOHARDCRIT "nohardcrit"
|
|
#define TRAIT_NOSOFTCRIT "nosoftcrit"
|
|
#define TRAIT_MINDSHIELD "mindshield"
|
|
|
|
|
|
#define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance"
|
|
#define TRAIT_AGEUSIA "ageusia"
|
|
#define TRAIT_HEAVY_SLEEPER "heavy_sleeper"
|
|
#define TRAIT_NIGHT_VISION "night_vision"
|
|
#define TRAIT_LIGHT_STEP "light_step"
|
|
#define TRAIT_SPEEDY_STEP "speedy_step"
|
|
#define TRAIT_SPIRITUAL "spiritual"
|
|
#define TRAIT_VORACIOUS "voracious"
|
|
#define TRAIT_SELF_AWARE "self_aware"
|
|
#define TRAIT_FREERUNNING "freerunning"
|
|
#define TRAIT_SKITTISH "skittish"
|
|
#define TRAIT_POOR_AIM "poor_aim"
|
|
#define TRAIT_PROSOPAGNOSIA "prosopagnosia"
|
|
#define TRAIT_DRUNK_HEALING "drunk_healing"
|
|
#define TRAIT_TAGGER "tagger"
|
|
#define TRAIT_PHOTOGRAPHER "photographer"
|
|
#define TRAIT_MUSICIAN "musician"
|
|
#define TRAIT_CROCRIN_IMMUNE "crocin_immune"
|
|
#define TRAIT_NYMPHO "nymphomania"
|
|
#define TRAIT_MASO "masochism"
|
|
#define TRAIT_ASSBLASTUSA "assblastusa"
|
|
#define TRAIT_CULT_EYES "cult_eyes"
|
|
|
|
// common trait sources
|
|
#define TRAIT_GENERIC "generic"
|
|
#define EYE_DAMAGE "eye_damage"
|
|
#define GENETIC_MUTATION "genetic"
|
|
#define OBESITY "obesity"
|
|
#define MAGIC_TRAIT "magic"
|
|
#define TRAUMA_TRAIT "trauma"
|
|
#define SPECIES_TRAIT "species"
|
|
#define ORGAN_TRAIT "organ"
|
|
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
|
|
|
|
// unique trait sources, still defines
|
|
#define STATUE_MUTE "statue"
|
|
#define CHANGELING_DRAIN "drain"
|
|
#define CHANGELING_HIVEMIND_MUTE "ling_mute"
|
|
#define ABYSSAL_GAZE_BLIND "abyssal_gaze"
|
|
#define HIGHLANDER "highlander"
|
|
#define TRAIT_HULK "hulk"
|
|
#define STASIS_MUTE "stasis"
|
|
#define GENETICS_SPELL "genetics_spell"
|
|
#define EYES_COVERED "eyes_covered"
|