Files
Aurora.3/code/__DEFINES/mobs.dm
VMSolidus 48d8a06d1c Conditioning Skill And Mass (#22747)
This PR does a few new things:

1. Adds a Mass var for Movables (/Mob, /Obj) which is literally required
for me to do anything at all with Kinematics (Very routine basic
physics)
2. Adds a derived "effective mass" statistic which is generated via
signal hook, allowing sources like Skills, Drugs, Cybernetics etc to
pitch in and contribute to a user's "Strength" in certain situations
without directly modifying mass.
3. Adds a mass modifier var for species datums, while painstakingly
calibrating each and every single species with consultation from every
lore team. A baseline human gets 72.0kg of Human Reference Mass. Any
species applied to it will multiply this by a constant that
algebraically cancels out the Human Reference Mass and replaces it with
a Species Reference Mass. Changing a species via the usual procs will
reset and then re-apply the correct values.
4. Refactored Lift/Drag/Fireman to have limits and penalties based on
relative effective mass
5. Finally, to make use of all this, I've added a new Conditioning
Skill, which modifies effective mass.

The standard assumption made for Lift/Carry is based in an assumption
that a typical character should realistically be able to
lift/carry/fireman a person 1.25x their mass. Previously the fireman
carry mechanic was heavily hardcoded, and didn't have much in the way of
granularity. If I wanted to RP a character that was a bodybuilder, there
wasn't really a way to do this. With this PR, there's now a fairly large
variety of interesting breakpoints.

This also allows there to be more granularity between different species
as desired by our lore teams. For example, a Zhan is in general stronger
than a M'sai. To give an example in the breakpoints for two different
species:

Human Lift Breakpoints:
Rank 1: 90kg (lift a Skrell, Human, Offworlder, M'sai, KA, or ZA)
Rank 2: 112.5kg (Lift a Zhan, Shell, or Diona Coeus)
Rank 3: 135kg (Lift a (Non-Industrial) IPC, Unathi)
Rank 4: 157.5kg (No new breakpoints, though you get less a movespeed
penalty from lugging around any of the above)
Can Never Lift: Industrial, Bullwark, Diona, Vaurca Ta'

Zhan Tajara Lift Breakpoints:
Rank 1: 116kg (Skrell, Human, Offworlder, M'sai, Ka, Za, Zhan, Shell, or
Diona Coeus)
Rank 2: 145kg (Non-Industrial IPC, Unathi)
Rank 3: 174kg (No new breakpoints, though you get less penalties from
the above)
Rank 4: 203kg (Juuuust barely lift an Industrial or Diona with heavy
slowdown)

<img width="1078" height="436" alt="image"
src="https://github.com/user-attachments/assets/a6802515-a827-4dc1-8734-55b604c589ab"
/>

Conditioning as a Skill sits in the Occupational category, which has
been carefully chosen and designed around to create a fairly compelling
web of opportunity costs. As a skill, it's very desireable for basically
any person that wants to play a "Muscular character" and also enjoys
fireman carrying people around, which makes it particularly useful for
hangar techs. By contrast a Paramedic might not actually need this
skill, since they can bypass the usual limits by just using rollerbeds.

---------

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
2026-07-12 18:06:51 +00:00

709 lines
27 KiB
Plaintext

// /mob/var/stat things.
#define CONSCIOUS 0
#define UNCONSCIOUS 1
#define DEAD 2
// Bitflags defining which status effects could be or are inflicted on a mob.
#define CANSTUN 0x1
#define CANWEAKEN 0x2
#define CANPARALYSE 0x4
#define CANPUSH 0x8
#define LEAPING 0x10
#define PASSEMOTES 0x20 // Mob has a cortical borer or holders inside of it that need to see emotes.
#define NOFALL 0x800
#define GODMODE 0x1000
#define FAKEDEATH 0x2000 // Replaces stuff like changeling.changeling_fakedeath.
#define DISFIGURED 0x4000 // Set but never checked. Remove this sometime and replace occurences with the appropriate organ code
#define XENO_HOST 0x8000 // Tracks whether we're gonna be a baby alien's mummy.
#define NO_ANTAG 0x10000 // Players are restricted from gaining antag roles when occupying this mob
// Incorporeal movement
#define INCORPOREAL_DISABLE 0 // Disabled
#define INCORPOREAL_GHOST 1 // Pass through matter like a ghost
#define INCORPOREAL_NINJA 2 // Pass through matter with a cool effect
#define INCORPOREAL_BSTECH 3 // Like ninja, but also go across Z-levels and move in space freely
#define INCORPOREAL_SHADE 4 // Shady
#define INCORPOREAL_MECH 5 // stripped down bstech
#define MOB_GRAB_NORMAL 1
#define MOB_GRAB_FIREMAN 2
// Grab levels.
#define GRAB_PASSIVE 1
#define GRAB_AGGRESSIVE 2
#define GRAB_NECK 3
#define GRAB_UPGRADING 4
#define GRAB_KILL 5
#define BORGMESON 0x1
#define BORGTHERM 0x2
#define BORGXRAY 0x4
#define BORGMATERIAL 8
#define HOSTILE_STANCE_IDLE 1
#define HOSTILE_STANCE_ALERT 2
#define HOSTILE_STANCE_ATTACK 3
#define HOSTILE_STANCE_ATTACKING 4
#define HOSTILE_STANCE_TIRED 5
#define ON_ATTACK_COOLDOWN(hostile_mob) world.time < hostile_mob.hostile_time_between_attacks + hostile_mob.hostile_last_attack
#define LEFT 1
#define RIGHT 2
// Pulse levels, very simplified.
#define PULSE_NONE 0 // So !M.pulse checks would be possible.
#define PULSE_SLOW 1 // <60 bpm
#define PULSE_NORM 2 // 60-90 bpm
#define PULSE_FAST 3 // 90-120 bpm
#define PULSE_2FAST 4 // >120 bpm
#define PULSE_THREADY 5 // Occurs during hypovolemic shock
#define GETPULSE_HAND 0 // Less accurate. (hand)
#define GETPULSE_TOOL 1 // More accurate. (med scanner, sleeper, etc.)
#define PULSE_MAX_BPM 250 // Highest, readable BPM by machines and humans.
// Blood pressure levels, simplified
#define HIGH_BP_MOD 20
#define PRE_HIGH_BP_MOD 5
#define BP_SYS_IDEAL_MOD 40
#define BP_DIS_IDEAL_MOD 20
#define BLOOD_PRESSURE_HIGH 4
#define BLOOD_PRESSURE_PRE_HIGH 3
#define BLOOD_PRESSURE_IDEAL 2
#define BLOOD_PRESSURE_LOW 1
// total_radiation levels (Note that total_radiation can be above RADS_MAX until handle_mutations_and_radiation() runs)
#define RADS_NONE 0
#define RADS_LOW 1
#define RADS_MED 50
#define RADS_HIGH 75
#define RADS_MAX 100
//intent flags, why wasn't this done the first time?
#define I_HELP "help"
#define I_DISARM "disarm"
#define I_GRAB "grab"
#define I_HURT "harm"
//movement intents
#define M_WALK "walk"
#define M_RUN "run"
// Limbs and robotic stuff.
#define BP_L_FOOT "l_foot"
#define BP_R_FOOT "r_foot"
#define BP_L_LEG "l_leg"
#define BP_R_LEG "r_leg"
#define BP_L_HAND "l_hand"
#define BP_R_HAND "r_hand"
#define BP_L_ARM "l_arm"
#define BP_R_ARM "r_arm"
#define BP_HEAD "head"
#define BP_CHEST "chest"
#define BP_GROIN "groin"
#define BP_ALL_LIMBS list(BP_CHEST, BP_GROIN, BP_HEAD, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND, BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)
#define BP_IS_ROBOTIC(org) (org.status & ORGAN_ROBOT)
#define ROBOTIC_NONE 0
#define ROBOTIC_ASSISTED 1
#define ROBOTIC_MECHANICAL 2
//Generic organs
#define BP_MOUTH "mouth"
#define BP_EYES "eyes"
#define BP_HEART "heart"
#define BP_LUNGS "lungs"
#define BP_BRAIN "brain"
#define BP_LIVER "liver"
#define BP_KIDNEYS "kidneys"
#define BP_STOMACH "stomach"
#define BP_APPENDIX "appendix"
//Vaurca organs
#define BP_NEURAL_SOCKET "neural socket"
#define BP_PHORON_RESERVE "phoron reserve tank"
#define BP_FILTRATION_BIT "filtration bit"
#define BP_PHORON_RESERVOIR "phoron reservoir"
#define BP_VAURCA_LIVER "mechanical liver"
#define BP_VAURCA_KIDNEYS "mechanical kidneys"
#define BP_HIVENET_SHIELD "hivenet electronic defense suite"
//Aut'akh organs
#define BP_ANCHOR "anchor"
#define BP_HAEMO "haemodynamic"
#define BP_ADRENAL "adrenal"
//IPC organs
#define BP_CELL "cell"
#define BP_OPTICS "optics"
#define BP_IPCTAG "ipc tag"
#define BP_REACTOR "reactor"
#define BP_VOICE_SYNTHESIZER "voice synthesizer"
#define BP_DIAGNOSTICS_SUITE "internal diagnostics suite"
#define BP_HYDRAULICS "hydraulics system"
#define BP_COOLING_UNIT "cooling unit"
#define BP_ACCESS_PORT "universal access port"
#define BP_ACTUATORS_LEFT "left arm actuators"
#define BP_ACTUATORS_RIGHT "right arm actuators"
#define BP_SURGE_PROTECTOR "surge"
#define BP_DATACORE "data core"
#define BP_TARGETING_CORE "targeting core"
// Bishop frame only.
#define BP_WIRELESS_ACCESS "wireless access point"
// G2 frame only.
#define BP_INTERNAL_STORAGE "internal storage system"
// Parasite organs
#define BP_ZOMBIE_PARASITE "black tumour"
#define BP_WORM_HEART "heart fluke"
#define BP_WORM_NERVE "nerve fluke"
#define BP_TUMOUR_NONSPREADING "benign tumour"
#define BP_TUMOUR_SPREADING "malignant tumour"
#define BP_GREIMORIAN_EGGCLUSTER "greimorian egg cluster"
//Augment organs
#define BP_AUG_ACC_CORDS "modified synthetic vocal cords"
#define BP_AUG_AIR_ANALYZER "integrated air analyzer"
#define BP_AUG_AUX_HEART "auxiliary heart"
#define BP_AUG_CALF_OVERRIDE "calf overdrive"
#define BP_AUG_COCHLEAR "cochlear implant"
#define BP_AUG_CORDS "synthetic vocal cords"
#define BP_AUG_CORRECTIVE_LENS "corrective lenses"
#define BP_AUG_CRAYON "retractable crayon"
#define BP_AUG_CYBORG_ANALYZER "retractable cyborg analyzer"
#define BP_AUG_DRILL "integrated mining drill"
#define BP_AUG_EMOTION "emotional manipulator"
#define BP_AUG_ENCHANED_VISION "vision enhanced retinas"
#define BP_AUG_ETHANOL_BURNER "integrated ethanol burner"
#define BP_AUG_EYE_SENSORS "integrated eyes sensors"
#define BP_AUG_FUEL_CELL "integrated fuel cell"
#define BP_AUG_FLUFF_HEAD "head augmentation"
#define BP_AUG_FLUFF_HEAD_BIO "head bioaug"
#define BP_AUG_FLUFF_CHEST "chest augmentation"
#define BP_AUG_FLUFF_CHEST_BIO "chest bioaug"
#define BP_AUG_FLUFF_R_HAND "right hand augmentation"
#define BP_AUG_FLUFF_R_HAND_BIO "right hand bioaug"
#define BP_AUG_FLUFF_L_HAND "left hand augmentation"
#define BP_AUG_FLUFF_L_HAND_BIO "left hand bioaug"
#define BP_AUG_GLARE_DAMPENER "glare dampeners"
#define BP_AUG_GUSTATORIAL "integrated gustatorial centre"
#define BP_AUG_GRAV_ADAPTATION "gravity adaptations"
#define BP_AUG_HAIR "synthetic hair extensions"
#define BP_AUG_HEALTHSCAN "integrated health scanner"
#define BP_AUG_LANGUAGE "integrated language processor"
#define BP_AUG_LANGUAGE_CTHUR "cthur language processor"
#define BP_AUG_LANGUAGE_KLAX "klaxan language processor"
#define BP_AUG_LANGUAGE_MIKUETZ "mikuetz language processor"
#define BP_AUG_LANGUAGE_TRADEBAND "tradeband language processor"
#define BP_AUG_LANGUAGE_VEKATAK "vekatak language processor"
#define BP_AUG_LANGUAGE_ZENG "zeng language processor"
#define BP_AUG_LANGUAGE_ZINO "zino language processor"
#define BP_AUG_LIGHTER "retractable lighter"
#define BP_AUG_MAGBOOT "integrated mag-claws"
#define BP_AUG_MEMORY "memory inhibitor"
#define BP_AUG_MIND_BLANKER "mind blanker"
#define BP_AUG_MIND_BLANKER_L "lethal mind blanker"
#define BP_AUG_PEN "retractable combipen"
#define BP_AUG_PLATELET_FACTORIES "platelet factories"
#define BP_AUG_PSI "psionic receiver"
#define BP_AUG_RADIO "integrated radio"
#define BP_AUG_SIGHTLIGHTS "ocular installed sightlights"
#define BP_AUG_SUBDERMAL_CARAPACE "subdermal carapace"
#define BP_AUG_SUSPENSION "calf suspension"
#define BP_AUG_TASTE_BOOSTER "taste booster"
#define BP_AUG_TESLA "tesla spine"
#define BP_AUG_TIMEPIECE "integrated timepiece"
#define BP_AUG_TRANSLATOR "universal translator"
#define BP_AUG_TOOL "retractable combitool"
//Organ defines
#define PROCESS_ACCURACY 10
#define DEFAULT_BLOOD_AMOUNT 560 //Default blood amount in units
//These are used Bump() code for living mobs, in the mob_bump_flag, mob_swap_flags, and mob_push_flags vars to determine whom can bump/swap with whom.
#define HUMAN 1
#define MONKEY 2
#define ALIEN 4
#define ROBOT 8
#define SLIME 16
#define SIMPLE_ANIMAL 32
#define HEAVY 64
#define ALLMOBS (HUMAN|MONKEY|ALIEN|ROBOT|SLIME|SIMPLE_ANIMAL|HEAVY)
//Types of diona, returned by is_diona
#define DIONA_NYMPH 1
#define DIONA_WORKER 2
// Robot AI notifications
#define ROBOT_NOTIFICATION_NEW_UNIT 1
#define ROBOT_NOTIFICATION_NEW_NAME 2
#define ROBOT_NOTIFICATION_NEW_MODULE 3
#define ROBOT_NOTIFICATION_MODULE_RESET 4
// Appearance change flags
#define APPEARANCE_UPDATE_DNA 1
#define APPEARANCE_RACE (2|APPEARANCE_UPDATE_DNA)
#define APPEARANCE_GENDER (4|APPEARANCE_UPDATE_DNA)
#define APPEARANCE_SKIN 8
#define APPEARANCE_HAIR 16
#define APPEARANCE_HAIR_COLOR 32
#define APPEARANCE_FACIAL_HAIR 64
#define APPEARANCE_FACIAL_HAIR_COLOR 128
#define APPEARANCE_EYE_COLOR 256
#define APPEARANCE_CULTURE 512
#define APPEARANCE_LANGUAGE 1024
#define APPEARANCE_PROSTHETICS 2048
#define APPEARANCE_ALL 65535
#define APPEARANCE_ALL_HAIR (APPEARANCE_HAIR|APPEARANCE_HAIR_COLOR|APPEARANCE_FACIAL_HAIR|APPEARANCE_FACIAL_HAIR_COLOR)
#define APPEARANCE_PLASTICSURGERY (APPEARANCE_ALL & ~APPEARANCE_RACE)
#define APPEARANCE_SURGERYKIT (APPEARANCE_PLASTICSURGERY & ~APPEARANCE_LANGUAGE & ~ APPEARANCE_PROSTHETICS)
// Click cooldown
#define DEFAULT_ATTACK_COOLDOWN 8 //Default timeout for aggressive actions
#define DEFAULT_QUICK_COOLDOWN 4
#define MIN_SUPPLIED_LAW_NUMBER 15
#define MAX_SUPPLIED_LAW_NUMBER 50
//default item on-mob icons
#define INV_HEAD_DEF_ICON 'icons/mob/head.dmi'
#define INV_BACK_DEF_ICON 'icons/mob/back.dmi'
#define INV_L_HAND_DEF_ICON 'icons/mob/items/lefthand.dmi'
#define INV_R_HAND_DEF_ICON 'icons/mob/items/righthand.dmi'
#define INV_W_UNIFORM_DEF_ICON 'icons/mob/uniform.dmi'
#define INV_ACCESSORIES_DEF_ICON 'icons/mob/ties.dmi'
#define INV_BELT_DEF_ICON 'icons/mob/belt.dmi'
#define INV_SUIT_DEF_ICON 'icons/mob/suit.dmi'
#define INV_L_EAR_DEF_ICON 'icons/mob/l_ear.dmi'
#define INV_R_EAR_DEF_ICON 'icons/mob/r_ear.dmi'
#define INV_SHOES_DEF_ICON 'icons/mob/feet.dmi'
#define INV_WRISTS_DEF_ICON 'icons/mob/wrist.dmi'
#define INV_PANTS_DEF_ICON 'icons/mob/pants.dmi'
// IPC tags
#define IPC_OWNERSHIP_SELF "Self Owned"
#define IPC_OWNERSHIP_COMPANY "Company Owned"
#define IPC_OWNERSHIP_PRIVATE "Privately Owned"
// How wealthy/poor a character is
#define ECONOMICALLY_WEALTHY "Wealthy"
#define ECONOMICALLY_WELLOFF "Well-off"
#define ECONOMICALLY_AVERAGE "Average"
#define ECONOMICALLY_UNDERPAID "Underpaid"
#define ECONOMICALLY_POOR "Poor"
#define ECONOMICALLY_DESTITUTE "Impoverished"
#define ECONOMICALLY_RUINED "Ruined"
#define ECONOMIC_POSITIONS list(ECONOMICALLY_WEALTHY, ECONOMICALLY_WELLOFF, ECONOMICALLY_AVERAGE, ECONOMICALLY_UNDERPAID, ECONOMICALLY_POOR, ECONOMICALLY_DESTITUTE, ECONOMICALLY_RUINED)
// Defines the argument used for get_mobs_or_objs_in_view
#define GHOSTS_ALL_HEAR 1
#define ONLY_GHOSTS_IN_VIEW 0
// Handle speech problems defines
#define HSP_MSG "message"
#define HSP_VERB "verb"
#define HSP_MSGMODE "message mode"
#define HSP_MSGRANGE "message range"
// Defines mob sizes, used by lockers and to determine what is considered a small sized mob, etc.
#define MOB_LARGE 16
#define MOB_MEDIUM 9
#define MOB_SMALL 6
#define MOB_TINY 4
#define MOB_MINISCULE 1
// Mob weight, separate from mob size. Affects how easy a mob is to lift.
/// Light mobs, can be lifted by anyone.
#define MOB_WEIGHT_LIGHT 1
/// Medium weight mobs, the default for humanoids. Can be lifted by medium+.
#define MOB_WEIGHT_MEDIUM 2
/// Heavy mobs. They need speecial equipment or a heavy+ mob to lift.
#define MOB_WEIGHT_HEAVY 3
/// Superheavy mobs. Gonna need a lot of help with those.
#define MOB_WEIGHT_SUPERHEAVY 4
/*
Mob Reference Masses
*/
// Reference Masses of different Mobs. Unlike MOB_WEIGHT, these represent a physics-typed value, and thus can be used directly in Kinematic Equations.
// Note: These values absolutely must be in Kilograms, I'm terribly sorry for any Americans reading this, but these get included in physics equations that require Kg inputs.
// For any species with sexual dimorphism, the Reference Mass is 1/n * (sum of average mass of each sex).
// To give an example, an average adult female human weighs 62kg, and 80kg for an average adult male human.
// 62 + 80.7 = 142.7. Since there's two examples, 142.7 / 2 = 71.35, which to "fudge things a little" I round up to 72kg.
// Hence humans being 72.0kg and not 62.0kg.
// If you're making an alien with sexual dimorphism (or trimorphism, or polymorphism), the same pattern as humans can be followed.
// Whereas for aliens without notable differences, you can just use a single average number.
// It's perfectly reasonable to just give a rough guess, none of these numbers need to be perfectly exact or even clean, just in a general ballpark.
/// Average mass of a human (in Kg)
#define REFERENCE_MASS_HUMAN 72.0
/// Average mass of an Offworlder (in Kg)
#define REFERENCE_MASS_HUMAN_OFFWORLDER 62.0
/// Average mass of an Interstellar Megacorporation CEO (in Kg)
#define REFERENCE_MASS_CEO 76.4 // Megacorp lore requested this. :)
/// Average mass of a Skrell (in Kg)
#define REFERENCE_MASS_SKRELL 40.8
/// Average mass of an Axiori Skrell (in Kg)
#define REFERENCE_MASS_SKRELL_AXIORI 52.3
/// Average mass of a Diona (in Kg)
#define REFERENCE_MASS_DIONA 200
/// Average mass of a Diona Coeus (in Kg)
#define REFERENCE_MASS_DIONA_COEUS 100
/// Average mass of an Unathi (in Kg)
#define REFERENCE_MASS_UNATHI 120
/// Average mass of an IPC (in Kg)
#define REFERENCE_MASS_IPC 125
/// Average mass of a Shell (in Kg)
#define REFERENCE_MASS_IPC_SHELL 92.0
/// Average mass of an Industrial IPC (in Kg)
#define REFERENCE_MASS_IPC_INDUSTRIAL 200
/// Average mass of a (Njarir or Hharar) Tajara (in Kg)
#define REFERENCE_MASS_TAJARA 80.0
/// Average mass of a M'sai Tajara (in Kg)
#define REFERENCE_MASS_TAJARA_MSAI 85.2
/// Average mass of a Zhan Tajara (in Kg)
#define REFERENCE_MASS_TAJARA_ZHAN 92.9
/// Average mass of a Tesla Rejuv Suit (in Kg)
#define REFERENCE_MASS_TAJARA_TESLA 500
/// Average mass of a Vaurca Worker (in Kg)
#define REFERENCE_MASS_VAURCA_KA 85.0
/// Average mass of a Vaurca Warrior (in Kg)
#define REFERENCE_MASS_VAURCA_ZA 80.2
/// Average mass of a Vaurca Breeder (in Kg)
#define REFERENCE_MASS_VAURCA_TA 1000 // BEEG
/// Average mass of a Vaurca Bulwark (in Kg)
#define REFERENCE_MASS_VAURCA_RA 363
/// Average mass of a Vaurca Warform (in Kg)
#define REFERENCE_MASS_VAURCA_BA 800
// Mob strength. This allows us to represent stronger mobs with a bit more granularity. Robots should be stronger than normal people. A bonus to the checks on lifting/throwing mobs, essentially.
/// A normal mob, basically. Does not get us any buffs.
#define MOB_STRENGTH_NORMAL 1.25
/// A strong mob. Small bonus.
#define MOB_STRENGTH_STRONG 1.5
/// A very strong mob. Big bonus.
#define MOB_STRENGTH_VERY_STRONG 2.0
#define BASE_MAX_NUTRITION 600
#define HUNGER_FACTOR 0.04 // Factor of how fast mob nutrition decreases over time.
#define BASE_MAX_HYDRATION 800
#define THIRST_FACTOR 0.02 // Factor of how fast mob hydration decreases over time.
#define CREW_MINIMUM_HYDRATION CREW_HYDRATION_HYDRATED // The minimum amount of nutrition a crewmember will spawn with, represented as a percentage
#define CREW_MAXIMUM_HYDRATION CREW_HYDRATION_OVERHYDRATED // Same as above, but maximum.
#define CREW_MINIMUM_NUTRITION CREW_NUTRITION_FULL // The minimum amount of nutrition a crewmember will spawn with, represented as a percentage.
#define CREW_MAXIMUM_NUTRITION CREW_NUTRITION_OVEREATEN // Same as above, but maximum.
//Note that all of this is relative to nutrition/max nutrition
#define CREW_NUTRITION_OVEREATEN 0.8
#define CREW_NUTRITION_FULL 0.4
#define CREW_NUTRITION_SLIGHTLYHUNGRY 0.3
#define CREW_NUTRITION_HUNGRY 0.2
#define CREW_NUTRITION_VERYHUNGRY 0.1
#define CREW_NUTRITION_STARVING 0
//Note that all of this is relative to hydration/max hydration
#define CREW_HYDRATION_OVERHYDRATED 1.01 //Overhydration can't occur.
#define CREW_HYDRATION_HYDRATED 0.4
#define CREW_HYDRATION_SLIGHTLYTHIRSTY 0.3
#define CREW_HYDRATION_THIRSTY 0.2
#define CREW_HYDRATION_VERYTHIRSTY 0.1
#define CREW_HYDRATION_DEHYDRATED 0
#define TINT_NONE 0
#define TINT_MODERATE 1
#define TINT_HEAVY 2
#define TINT_BLIND 3
#define FLASH_PROTECTION_REDUCED -1
#define FLASH_PROTECTION_NONE 0
#define FLASH_PROTECTION_MODERATE 1
#define FLASH_PROTECTION_MAJOR 2
#define EAR_PROTECTION_REDUCED -1
#define EAR_PROTECTION_NONE 0
#define EAR_PROTECTION_MODERATE 1
#define EAR_PROTECTION_MAJOR 2
#define ANIMAL_SPAWN_DELAY round(GLOB.config.respawn_delay / 6)
#define DRONE_SPAWN_DELAY round(GLOB.config.respawn_delay / 3)
// Gluttony levels.
#define GLUT_TINY 1 // Eat anything tiny and smaller
#define GLUT_SMALLER 2 // Eat anything smaller than we are
#define GLUT_ANYTHING 4 // Eat anything, ever
#define GLUT_MESSY 8 // Only eat mobs, and eat them in chunks.
#define GLUT_ITEM_TINY 16 // Eat items with a w_class of small or smaller
#define GLUT_ITEM_NORMAL 32 // Eat items with a w_class of normal or smaller
#define GLUT_ITEM_ANYTHING 64 // Eat any item
#define GLUT_PROJECTILE_VOMIT 128 // When vomitting, does it fly out?
// Devour speeds, returned by can_devour()
#define DEVOUR_SLOW 1
#define DEVOUR_FAST 2
// Incapacitation flags, used by the mob/proc/incapacitated() proc
#define INCAPACITATION_NONE 0
#define INCAPACITATION_RESTRAINED 1
#define INCAPACITATION_BUCKLED_PARTIALLY 2
#define INCAPACITATION_BUCKLED_FULLY 4
#define INCAPACITATION_STUNNED 8
#define INCAPACITATION_FORCELYING 16
#define INCAPACITATION_KNOCKOUT 32
#define INCAPACITATION_KNOCKDOWN (INCAPACITATION_KNOCKOUT|INCAPACITATION_FORCELYING)
#define INCAPACITATION_DISABLED (INCAPACITATION_KNOCKDOWN|INCAPACITATION_STUNNED)
#define INCAPACITATION_DEFAULT (INCAPACITATION_RESTRAINED|INCAPACITATION_BUCKLED_FULLY|INCAPACITATION_DISABLED)
#define INCAPACITATION_ALL (~INCAPACITATION_NONE)
#define MOB_PULL_NONE 0
#define MOB_PULL_SMALLER 1
#define MOB_PULL_SAME 2
#define MOB_PULL_LARGER 3
//Time of Death constants
//Used with a list in preference datums to track times of death
#define CREW "crew" //Used for crewmembers, AI, cyborgs, nymphs, antags
#define ANIMAL "animal" //Used for rats and any other simple animals
#define MINISYNTH "minisynth"//Used for drones and pAIs
#define RESPAWN_ANIMAL 3000
#define RESPAWN_MINISYNTH 6000
// Flags for the eat_types variable, a bitfield of what can or can't be eaten
// Note that any given mob can be more than one type
#define TYPE_ORGANIC 1 // Almost any creature under /mob/living/carbon and most simple animals
#define TYPE_SYNTHETIC 2 // Everything under /mob/living/silicon, plus IPCs, viscerators
#define TYPE_HUMANOID 4 // Humans, skrell, unathi, tajara, vaurca, diona, IPC
#define TYPE_WEIRD 8 // Slimes, constructs, demons, and other creatures of a magical or bluespace nature.
#define TYPE_INCORPOREAL 16 // Mobs that don't really have any physical form to them.
// Maximum number of chickens allowed at once.
// If the number of chickens on the map exceeds this, laid eggs will not hatch.
#define MAX_CHICKENS 50
//carbon taste sensitivity defines, used in mob/living/carbon/proc/ingest
#define TASTE_HYPERSENSITIVE 3 //anything below 5%
#define TASTE_SENSITIVE 2 //anything below 7%
#define TASTE_NORMAL 1 //anything below 15%
#define TASTE_DULL 0.5 //anything below 30%
#define TASTE_NUMB 0.1 //anything below 150%
//ear healing limit - past this ear_damage your ear will not recover its hearing over time
#define HEARING_DAMAGE_LIMIT 100
#define HEARING_DAMAGE_SLOW_HEAL 25
// Used by hearing sensitivity
#define HEARING_NORMAL 0
#define HEARING_SENSITIVE 1
#define HEARING_VERY_SENSITIVE 2
#define MACHINE_SOUND "You hear the sound of machinery"
#define BUTTON_FLICK "You hear a click"
#define THUNK_SOUND "You hear a THUNK"
#define PING_SOUND "You hear a ping"
//Used by emotes
#define VISIBLE_MESSAGE 1
#define AUDIBLE_MESSAGE 2
//helper for inverting armor blocked values into a multiplier
#define BLOCKED_MULT(blocked) max(1 - (blocked/100), 0)
// Prosthetic organ defines.
#define PROSTHETIC_IPC "Hephaestus Integrated Limb"
#define PROSTHETIC_HK "Hephaestus Vulcanite Limb"
#define PROSTHETIC_IND "Hephaestus Industrial Limb"
#define PROSTHETIC_SYNTHSKIN "Human Synthskin"
#define PROSTHETIC_BC "Bishop Cybernetics"
#define PROSTHETIC_ZH "Zeng-Hu Pharmaceuticals"
#define PROSTHETIC_HI "Hephaestus Industries"
#define PROSTHETIC_XMG "Xion Manufacturing Group"
#define PROSTHETIC_DIONA "Unknown Model"
#define PROSTHETIC_AUTAKH "Aut'akh Manufactured"
#define PROSTHETIC_TESLA "Tesla Powered Prosthetics"
#define PROSTHETIC_TESLA_BODY "Industrial Tesla Powered Prosthetics"
#define PROSTHETIC_VAURCA "Vaurca Robotic Limb"
#define PROSTHETIC_VAURCA_WARRIOR "Vaurca Warrior Robotic Limb"
#define PROSTHETIC_UNBRANDED "Unbranded"
#define PROSTHETIC_UNBRANDED_EMISSIVE "Unbranded Emissive"
#define PROSTHETIC_HOPLAN "Hoplan Head"
#define PROSTHETIC_RAXUS "Raxus Head"
#define PROSTHETIC_INDRICUS "Indricus Head"
#define PROSTHETIC_SELEN "Selen Head"
#define PROSTHETIC_SIENNA "Sienna Head"
#define PROSTHETIC_SISEYO "Siseyo Head"
#define PROSTHETIC_CHEAP "Cheap Prosthetic"
//Prosthetics that aren't restricted by species
#define PROSTHETICS_UNRESTRICTED list(PROSTHETIC_BC, PROSTHETIC_HI, PROSTHETIC_XMG, PROSTHETIC_UNBRANDED, PROSTHETIC_ZH)
//Brain Damage defines
#define BRAIN_DAMAGE_MILD 10
#define BRAIN_DAMAGE_SEVERE 40
#define CURE_CRYSTAL "crystal"
#define CURE_SOLITUDE "solitude"
#define CURE_HYPNOSIS "hypnosis"
#define CURE_SURGERY "surgery"
#define CURE_ADMIN "all"
// triage tags
#define TRIAGE_NONE "None"
#define TRIAGE_GREEN "Green"
#define TRIAGE_YELLOW "Yellow"
#define TRIAGE_RED "Red"
#define TRIAGE_BLACK "Black"
// Surgery Stuff
#define SURGERY_SUCCESS 2 // Proceed with surgery
#define SURGERY_FAIL 1 // Autofail surgery
#define SURGERY_IGNORE 0 // Ignore surgery completely and just attack
#define STASIS_MISC "misc"
#define STASIS_CRYOBAG "cryobag"
#define STASIS_COLD "cold"
#define AURA_CANCEL 1
#define AURA_FALSE 2
#define AURA_TYPE_BULLET "Bullet"
#define AURA_TYPE_WEAPON "Weapon"
#define AURA_TYPE_THROWN "Thrown"
#define AURA_TYPE_LIFE "Life"
// Remote Control defines
#define REMOTE_GENERIC_MECH "remotemechs"
#define REMOTE_AI_MECH "aimechs"
#define REMOTE_PRISON_MECH "prisonmechs"
#define REMOTE_GENERIC_ROBOT "remoterobots"
#define REMOTE_BUNKER_ROBOT "bunkerrobots"
#define REMOTE_PRISON_ROBOT "prisonrobots"
#define REMOTE_WARDEN_ROBOT "wardenrobots"
#define REMOTE_AI_ROBOT "airobots"
// Robot Overlay Defines
#define ROBOT_PANEL_EXPOSED "exposed"
#define ROBOT_PANEL_CELL "cell"
#define ROBOT_PANEL_NO_CELL "no cell"
#define ROBOT_ICON "iconpath"
#define ROBOT_CHASSIS "chassistype"
#define ROBOT_PANEL "paneltype"
#define ROBOT_EYES "eyetype"
#define BLOOD_REGEN_RATE 0.1
// Height Defines
#define HEIGHT_NOT_USED 0
#define HEIGHT_CLASS_TINY 130
#define HEIGHT_CLASS_SHORT 150
#define HEIGHT_CLASS_AVERAGE 170
#define HEIGHT_CLASS_TALL 190
#define HEIGHT_CLASS_HUGE 240
#define HEIGHT_CLASS_GIGANTIC 300
#define UNBUCKLED 0
#define PARTIALLY_BUCKLED 1
#define FULLY_BUCKLED 2
#define MOB_IS_INCAPACITATED(incapacitation_flags)\
(\
((incapacitation_flags & INCAPACITATION_STUNNED) && stunned) ||\
((incapacitation_flags & INCAPACITATION_FORCELYING) && (weakened || resting)) ||\
((incapacitation_flags & INCAPACITATION_KNOCKOUT) && (stat || paralysis || sleeping || (status_flags & FAKEDEATH))) ||\
((incapacitation_flags & INCAPACITATION_RESTRAINED) && restrained())\
? TRUE :\
(\
((incapacitation_flags & (INCAPACITATION_BUCKLED_PARTIALLY|INCAPACITATION_BUCKLED_FULLY))) ?\
(\
(buckled_to() >= PARTIALLY_BUCKLED && (incapacitation_flags & INCAPACITATION_BUCKLED_PARTIALLY)) || (buckled_to() == FULLY_BUCKLED && (incapacitation_flags & INCAPACITATION_BUCKLED_FULLY)) ?\
TRUE : FALSE\
) : FALSE\
)\
)
//used by /proc/do_after
#define DO_USER_CAN_MOVE FLAG(0)
#define DO_USER_CAN_TURN FLAG(1)
#define DO_USER_UNIQUE_ACT FLAG(2)
#define DO_USER_SAME_HAND FLAG(3)
#define DO_USER_SAME_ZONE FLAG(4)
#define DO_TARGET_CAN_MOVE FLAG(5)
#define DO_TARGET_CAN_TURN FLAG(6)
#define DO_TARGET_UNIQUE_ACT FLAG(7)
#define DO_SHOW_PROGRESS FLAG(8)
#define DO_MOVE_CHECKS_TURFS FLAG(9)
#define DO_FAIL_FEEDBACK FLAG(10)
// Preset macros
#define DO_BOTH_CAN_MOVE (DO_USER_CAN_MOVE | DO_TARGET_CAN_MOVE)
#define DO_BOTH_CAN_TURN (DO_USER_CAN_TURN | DO_TARGET_CAN_TURN)
#define DO_BOTH_UNIQUE_ACT (DO_USER_UNIQUE_ACT | DO_TARGET_UNIQUE_ACT)
#define DO_DEFAULT (DO_SHOW_PROGRESS | DO_USER_SAME_HAND | DO_BOTH_CAN_TURN | DO_FAIL_FEEDBACK)
// Preset do_after flags
#define DO_UNIQUE (DO_DEFAULT | DO_BOTH_UNIQUE_ACT) // Common flags for actions that should be unique
#define DO_EXERCISE (DO_USER_UNIQUE_ACT | DO_USER_SAME_HAND) // Flags for exercises. Doesn't show progress, or give any failure feedback.
#define DO_REPAIR_CONSTRUCT (DO_DEFAULT | DO_TARGET_UNIQUE_ACT) // Flags for repair and construction steps
#define DO_EQUIP (DO_DEFAULT | DO_USER_UNIQUE_ACT) // Flags for equipping/unequipping mobs. Set to allow a mob to be targeted by multiple sources, but for a source to only be able to perform one action at a time.
// Extra errors
#define DO_MISSING_USER (-1)
#define DO_MISSING_TARGET (-2)
#define DO_INCAPACITATED (-3)
#define DO_EXTRA_CHECKS (-4)
// Threshold defines for integrity damage. Used for when you want to check for a specific threshold to do damage effects.
#define IPC_INTEGRITY_THRESHOLD_LOW 75
#define IPC_INTEGRITY_THRESHOLD_MEDIUM 50
#define IPC_INTEGRITY_THRESHOLD_HIGH 25
#define IPC_INTEGRITY_THRESHOLD_VERY_HIGH 10
// These are the power supply organ defines.
// They are bitflags because it should be technically possible to have a power supply do multiple things at once if you wish.
// Just be wary of balancing issues.
/// The default functioning of a power reactor. Externally powered only. Allows recharging from APCs. Has a multiplier for faster recharging from power stations.
#define POWER_SUPPLY_ELECTRIC 1
/// Recharges by walking/running. Far slower at charging from external sources.
#define POWER_SUPPLY_KINETIC 2
/// Recharges through consuming nutrients/food. Slower at recharging from external sources.
#define POWER_SUPPLY_BIOLOGICAL 4
/// Recharges from external lighting. Slower at recharging from external sources.
#define POWER_SUPPLY_SOLAR 8
#define WEATHER_COOLDOWN_TIME (5 SECONDS)