Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
bdf0d14
Spooky Scary Supreme Surgery (Rework) (#93697)
MrMelbert Dec 19, 2025
67ea6b1
Fixes
MrMelbert Jan 29, 2026
58b2b5e
Fixes
MrMelbert Jan 29, 2026
1a3d14b
Fixes
MrMelbert Jan 29, 2026
a3d6486
Use any item as a prosthetic arm, what's the worst that could happen?…
MrMelbert Jun 19, 2025
ca57245
Fixes
MrMelbert Jan 29, 2026
fb1b9c1
Makes Bioware into Status Effects because they're just Status Effects…
MrMelbert Mar 23, 2024
7d43da7
Bioware stuff
MrMelbert Jan 29, 2026
3f24f11
Generalizes multi-slot implants and makes autosurgeons support them (…
SmArtKar Mar 16, 2025
5a035e6
Fixes
MrMelbert Jan 29, 2026
7b7d0ee
Demolition mod is inverted vs "soft" structures like spider webs (#90…
MrMelbert Apr 13, 2025
be59706
Removes Plasmeme innate damage vulnerability, replaces it with demoli…
MrMelbert Dec 19, 2025
04a9363
Adds a new INHALE reagent transfer method and applies it to smoking a…
necromanceranne Oct 30, 2024
f1303b8
Asthma quirk, inhalers - Electric Boogaloo (#92747)
nikothedude Sep 8, 2025
696c223
Pegging Update (#83991)
LucyGrind Jun 16, 2024
5444bf6
Fixes
MrMelbert Jan 29, 2026
8329e5e
Grand fixes
MrMelbert Jan 29, 2026
0f5fda0
Op PC update
MrMelbert Jan 29, 2026
3c66b05
Fixes
MrMelbert Jan 29, 2026
4b7f7c5
Adds an operation for treating a dislocation, also wound surgeries ge…
MrMelbert Jan 5, 2026
e83243b
Op click
MrMelbert Jan 29, 2026
82ca7bd
You can skip applying drapes to a mob bucked to operating tables or s…
MrMelbert Jan 3, 2026
3c97006
Comp
MrMelbert Jan 29, 2026
c5e7c2f
Lints
MrMelbert Jan 29, 2026
8c10ad7
Lints
MrMelbert Jan 29, 2026
ca5735c
Chainsaw fix
SmArtKar Oct 16, 2024
f65360a
Nullrod fix
MrMelbert Jan 29, 2026
7df488e
Sting fix
MrMelbert Jan 29, 2026
a707e1a
Bot fix
MrMelbert Jan 29, 2026
4bc138e
Borg fix
MrMelbert Jan 29, 2026
4f90033
Organ fix
MrMelbert Jan 29, 2026
d61303f
dme
MrMelbert Jan 29, 2026
1a169a2
Fixes
MrMelbert Jan 29, 2026
9103a2a
Fixes
MrMelbert Jan 29, 2026
d524350
Fix
MrMelbert Jan 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions code/__DEFINES/alerts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#define ALERT_TOO_MUCH_NITRO "too_much_nitro"
#define ALERT_NOT_ENOUGH_NITRO "not_enough_nitro"

#define ALERT_BRONCHODILATION "bronchodilation"

/** Mob related */
#define ALERT_SUCCUMB "succumb"
#define ALERT_BUCKLED "buckled"
Expand Down
130 changes: 130 additions & 0 deletions code/__DEFINES/bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,133 @@
#define AUGGED_CHEST_EMP_SHAKE_TIME 5 SECONDS
/// When hit by an EMP, the time an augged head will make vision fucky for.
#define AUGGED_HEAD_EMP_GLITCH_DURATION 6 SECONDS

// // Color priorities for bodyparts
// /// Abductor team recoloring priority
// #define LIMB_COLOR_AYYLMAO 5
// /// Hulk effect color priority
// #define LIMB_COLOR_HULK 10
// /// Fish infusion color priority
// #define LIMB_COLOR_FISH_INFUSION 15
// /// Carp infusion color priority
// #define LIMB_COLOR_CARP_INFUSION 20
// /// Untextured fish suicide color priority
// #define LIMB_COLOR_CS_SOURCE_SUICIDE 30
// /// Base priority for atom colors, gets atom priorities added to it
// #define LIMB_COLOR_ATOM_COLOR 40
// /// Voidwalker effect color priority
// #define LIMB_COLOR_VOIDWALKER_CURSE 50

// // Overlay priorities
// #define BODYPART_OVERLAY_FISH_INFUSION 1
// #define BODYPART_OVERLAY_CARP_INFUSION 2
// #define BODYPART_OVERLAY_CSS_SUICIDE 3
// #define BODYPART_OVERLAY_VOIDWALKER_CURSE 4

// Bodypart surgery state
/// An incision has been made into the skin
#define SURGERY_SKIN_CUT (1<<0)
/// Skin has been pulled back - 99% of surgeries require this
#define SURGERY_SKIN_OPEN (1<<1)
/// Blood vessels are accessible, cut, and bleeding
#define SURGERY_VESSELS_UNCLAMPED (1<<2)
/// Blood vessels are accessible but clamped
#define SURGERY_VESSELS_CLAMPED (1<<3)
/// Indicates either an incision has been made into the organs present in the limb or organs have been incised from the limb
#define SURGERY_ORGANS_CUT (1<<4)
/// Holes have been drilled in our bones, exclusive with sawed
#define SURGERY_BONE_DRILLED (1<<5)
/// Bones have been sawed apart
#define SURGERY_BONE_SAWED (1<<6)
/// Used in advanced plastic surgery: Has plastic been applied
#define SURGERY_PLASTIC_APPLIED (1<<7)
/// Used in prosthetic surgery: Is the prosthetic unsecured
#define SURGERY_PROSTHETIC_UNSECURED (1<<8)
/// Used for cavity implants
#define SURGERY_CAVITY_WIDENED (1<<9)

DEFINE_BITFIELD(surgery_state, list(
"SKIN CUT" = SURGERY_SKIN_CUT,
"SKIN OPEN" = SURGERY_SKIN_OPEN,
"VESSELS UNCLAMPED" = SURGERY_VESSELS_UNCLAMPED,
"VESSELS CLAMPED" = SURGERY_VESSELS_CLAMPED,
"ORGANS CUT" = SURGERY_ORGANS_CUT,
"BONE DRILLED" = SURGERY_BONE_DRILLED,
"BONE SAWED" = SURGERY_BONE_SAWED,
"PLASTIC APPLIED" = SURGERY_PLASTIC_APPLIED,
"PROSTHETIC UNSECURED" = SURGERY_PROSTHETIC_UNSECURED,
"CAVITY OPENED" = SURGERY_CAVITY_WIDENED,
))

/// For use in translating bitfield to human readable strings. Keep in the correct order!
#define SURGERY_STATE_READABLE list(\
"Skin is cut" = SURGERY_SKIN_CUT, \
"Skin is open" = SURGERY_SKIN_OPEN, \
"Blood vessels are unclamped" = SURGERY_VESSELS_UNCLAMPED, \
"Blood vessels are clamped" = SURGERY_VESSELS_CLAMPED, \
"Organs are cut" = SURGERY_ORGANS_CUT, \
"Bone is drilled" = SURGERY_BONE_DRILLED, \
"Bone is sawed" = SURGERY_BONE_SAWED, \
"Plastic is applied" = SURGERY_PLASTIC_APPLIED, \
"Prosthetic is unsecured" = SURGERY_PROSTHETIC_UNSECURED, \
"Cavity is opened wide" = SURGERY_CAVITY_WIDENED, \
)

/// For use in translating bitfield to steps required for surgery. Keep in the correct order!
#define SURGERY_STATE_GUIDES(must_must_not) list(\
"the skin [must_must_not] be cut" = SURGERY_SKIN_CUT, \
"the skin [must_must_not] be open" = SURGERY_SKIN_OPEN, \
"the blood vessels [must_must_not] be unclamped" = SURGERY_VESSELS_UNCLAMPED, \
"the blood vessels [must_must_not] be clamped" = SURGERY_VESSELS_CLAMPED, \
"the organs [must_must_not] be cut" = SURGERY_ORGANS_CUT, \
"the bone [must_must_not] be drilled" = SURGERY_BONE_DRILLED, \
"the bone [must_must_not] be sawed" = SURGERY_BONE_SAWED, \
"plastic [must_must_not] be applied" = SURGERY_PLASTIC_APPLIED, \
"the prosthetic [must_must_not] be unsecured" = SURGERY_PROSTHETIC_UNSECURED, \
"the chest cavity [must_must_not] be opened wide" = SURGERY_CAVITY_WIDENED, \
)

// Yes these are glorified bitflag manipulation macros, they're meant to make reading surgical operations a bit easier
/// Checks if the input surgery state has all of the bitflags passed
#define HAS_SURGERY_STATE(input_state, check_state) ((input_state & (check_state)) == (check_state))
/// Checks if the input surgery state has any of the bitflags passed
#define HAS_ANY_SURGERY_STATE(input_state, check_state) ((input_state & (check_state)))
/// Checks if the limb has all of the bitflags passed
#define LIMB_HAS_SURGERY_STATE(limb, check_state) HAS_SURGERY_STATE(limb?.surgery_state, check_state)
/// Checks if the limb has any of the bitflags passed
#define LIMB_HAS_ANY_SURGERY_STATE(limb, check_state) HAS_ANY_SURGERY_STATE(limb?.surgery_state, check_state)

/// All states that concern itself with the skin
#define ALL_SURGERY_SKIN_STATES (SURGERY_SKIN_CUT|SURGERY_SKIN_OPEN)
/// All states that concern itself with the blood vessels
#define ALL_SURGERY_VESSEL_STATES (SURGERY_VESSELS_UNCLAMPED|SURGERY_VESSELS_CLAMPED)
/// All states that concern itself with the bones
#define ALL_SURGERY_BONE_STATES (SURGERY_BONE_DRILLED|SURGERY_BONE_SAWED)
/// All states that concern itself with internal organs
#define ALL_SURGERY_ORGAN_STATES (SURGERY_ORGANS_CUT)

/// These states are automatically cleared when the surgery is closed for ease of use
#define ALL_SURGERY_STATES_UNSET_ON_CLOSE (ALL_SURGERY_SKIN_STATES|ALL_SURGERY_VESSEL_STATES|ALL_SURGERY_BONE_STATES|ALL_SURGERY_ORGAN_STATES|SURGERY_CAVITY_WIDENED)
/// Surgery state required for a limb with a certain zone to... be... fished... in...
#define ALL_SURGERY_FISH_STATES(for_zone) (SURGERY_SKIN_OPEN|SURGERY_ORGANS_CUT|(for_zone == BODY_ZONE_CHEST ? SURGERY_BONE_SAWED : NONE))

/// Surgery states flipped on automatically if the bodypart lacks a form of skin
#define SKINLESS_SURGERY_STATES (SURGERY_SKIN_OPEN)
// (These are normally mutually exclusive, but as a bonus for lacking bones, you can do drill and saw operations simultaneously!)
/// Surgery states flipped on automatically if the bodypart lacks bones
#define BONELESS_SURGERY_STATES (SURGERY_BONE_DRILLED|SURGERY_BONE_SAWED)
/// Surgery states flipped on automatically if the bodypart lacks vessels
#define VESSELLESS_SURGERY_STATES (SURGERY_VESSELS_CLAMPED|SURGERY_ORGANS_CUT)

/// Biological state that has some kind of skin that can be cut.
#define BIOSTATE_HAS_SKIN (BIO_FLESH|BIO_METAL|BIO_CHITIN)
/// Checks if a bodypart lacks both flesh and metal, meaning it has no skin to cut.
#define LIMB_HAS_SKIN(limb) (limb?.biological_state & BIOSTATE_HAS_SKIN)
/// Biological state that has some kind of bones that can be sawed.
#define BIOSTATE_HAS_BONES (BIO_BONE|BIO_METAL)
/// Checks if a bodypart lacks both bone and metal, meaning it has no bones to saw.
#define LIMB_HAS_BONES(limb) (limb?.biological_state & BIOSTATE_HAS_BONES)
/// Biological state that has some kind of vessels that can be clamped.
#define BIOSTATE_HAS_VESSELS (BIO_BLOODED|BIO_WIRED)
/// Checks if a bodypart lacks both blood and wires, meaning it has no vessels to manipulate.
#define LIMB_HAS_VESSELS(limb) (limb?.biological_state & BIOSTATE_HAS_VESSELS)
8 changes: 6 additions & 2 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
#define BODY_ZONE_L_LEG "l_leg"
#define BODY_ZONE_R_LEG "r_leg"

GLOBAL_LIST_INIT(arm_zones, list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))

#define BODY_ZONE_PRECISE_EYES "eyes"
#define BODY_ZONE_PRECISE_MOUTH "mouth"
#define BODY_ZONE_PRECISE_GROIN "groin"
Expand All @@ -255,6 +253,12 @@ GLOBAL_LIST_INIT(arm_zones, list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
#define BODY_ZONE_PRECISE_L_FOOT "l_foot"
#define BODY_ZONE_PRECISE_R_FOOT "r_foot"

GLOBAL_LIST_INIT(all_body_zones, list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG))
GLOBAL_LIST_INIT(limb_zones, list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG))
GLOBAL_LIST_INIT(arm_zones, list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
GLOBAL_LIST_INIT(leg_zones, list(BODY_ZONE_R_LEG, BODY_ZONE_L_LEG))
GLOBAL_LIST_INIT(all_precise_body_zones, list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT))

//We will round to this value in damage calculations.
#define DAMAGE_PRECISION 0.1

Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
/// From datum/component/edible/proc/TakeBite: (mob/living/eater, mob/feeder, bitecount, bitesize)
#define COMSIG_FOOD_EATEN "food_eaten"
#define DESTROY_FOOD (1<<0)
/// From datum/component/edible/proc/AttemptEat: (mob/living/eater, mob/feeder)
#define COMSIG_FOOD_ATTEMPT_EAT "food_attempt_eat"
// #define BLOCK_EAT_ATTEMPT (1<<0)
/// From base of datum/component/edible/on_entered: (mob/crosser, bitecount)
#define COMSIG_FOOD_CROSSED "food_crossed"
/// From base of Component/edible/On_Consume: (mob/living/eater, mob/living/feeder)
Expand Down
24 changes: 15 additions & 9 deletions code/__DEFINES/dcs/signals/signals_medical.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
/// From /datum/surgery/New(): (datum/surgery/surgery, surgery_location (body zone), obj/item/bodypart/targeted_limb)
#define COMSIG_MOB_SURGERY_STARTED "mob_surgery_started"

/// From /datum/surgery_step/success(): (datum/surgery_step/step, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results)
#define COMSIG_MOB_SURGERY_STEP_SUCCESS "mob_surgery_step_success"
/// From /datum/surgery_operation/try_perform(): (datum/surgery_operation/operation, atom/movable/operating_on, tool)
#define COMSIG_LIVING_SURGERY_STARTED "mob_surgery_started"
/// From /datum/surgery_operation/try_perform(): (datum/surgery_operation/operation, atom/movable/operating_on, tool)
#define COMSIG_LIVING_SURGERY_FINISHED "mob_surgery_finished"
/// From /datum/surgery_operation/success(): (datum/surgery_operation/operation, atom/movable/operating_on, tool)
#define COMSIG_LIVING_SURGERY_SUCCESS "mob_surgery_step_success"
/// From /datum/surgery_operation/failure(): (datum/surgery_operation/operation, atom/movable/operating_on, tool)
#define COMSIG_LIVING_SURGERY_FAILED "mob_surgery_step_failed"

/// From /obj/item/shockpaddles/do_help, after the defib do_after is complete, but before any effects are applied: (mob/living/defibber, obj/item/shockpaddles/source)
#define COMSIG_DEFIBRILLATOR_PRE_HELP_ZAP "carbon_being_defibbed"
Expand All @@ -13,7 +16,10 @@
#define COMSIG_DEFIBRILLATOR_SUCCESS "defib_success"
// #define COMPONENT_DEFIB_STOP (1<<0) // Same return, to stop default defib handling

/// From /datum/surgery/can_start(): (mob/source, datum/surgery/surgery, mob/living/patient)
#define COMSIG_SURGERY_STARTING "surgery_starting"
#define COMPONENT_CANCEL_SURGERY (1<<0)
#define COMPONENT_FORCE_SURGERY (1<<1)
/// From /obj/item/shockpaddles/proc/do_disarm(), sent to the shock-ee in non-revival scenarios: (obj/item/shockpaddles/source)
#define COMSIG_HEARTATTACK_DEFIB "heartattack_defib"

/// Sent from /mob/living/perform_surgery: (mob/living/patient, list/possible_operations)
#define COMSIG_LIVING_OPERATING_ON "living_operating_on"
/// Sent from /mob/living/perform_surgery: (mob/living/patient, list/possible_operations)
#define COMSIG_LIVING_BEING_OPERATED_ON "living_being_operated_on"
9 changes: 7 additions & 2 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
#define COMSIG_CARBON_LOSE_ADDICTION "carbon_lose_addiction"
///Called when a carbon gets a brain trauma (source = carbon, trauma = what trauma was added) - this is before on_gain()
#define COMSIG_CARBON_GAIN_TRAUMA "carbon_gain_trauma"
/// Return if you want to prevent the carbon from gaining the brain trauma.
#define COMSIG_CARBON_BLOCK_TRAUMA (1 << 0)
///Called when a carbon loses a brain trauma (source = carbon, trauma = what trauma was removed)
#define COMSIG_CARBON_LOSE_TRAUMA "carbon_lose_trauma"
///Called when a carbon's health hud is updated. (source = carbon, shown_health_amount)
Expand All @@ -107,8 +109,8 @@
#define COMSIG_CARBON_MOOD_UPDATE "carbon_mood_update"
///Called when a carbon attempts to eat (eating)
#define COMSIG_CARBON_ATTEMPT_EAT "carbon_attempt_eat"
// Prevents the breath
#define COMSIG_CARBON_BLOCK_EAT (1 << 0)
// Prevents eating the food
#define BLOCK_EAT_ATTEMPT (1 << 0)
///Called when a carbon vomits : (distance, force)
#define COMSIG_CARBON_VOMITED "carbon_vomited"
///Called from apply_overlay(cache_index, overlay)
Expand Down Expand Up @@ -178,3 +180,6 @@
#define COMSIG_HUMAN_GOT_PUNCHED "human_got_punched"
/// Called from /datum/species/proc/harm(): (mob/living/carbon/human/attacked, damage, attack_type, obj/item/bodypart/affecting, final_armor_block, kicking)
#define COMSIG_HUMAN_PUNCHED "human_punched"

//from base of [/obj/effect/particle_effect/fluid/smoke/proc/smoke_mob]: (seconds_per_tick)
#define COMSIG_CARBON_EXPOSED_TO_SMOKE "carbon_exposed_to_smoke"
7 changes: 7 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#define COMSIG_ORGAN_BEING_REPLACED "organ_being_replaced"
/// Called when an organ gets surgically removed (mob/living/user, mob/living/carbon/old_owner, target_zone, obj/item/tool)
#define COMSIG_ORGAN_SURGICALLY_REMOVED "organ_surgically_removed"
/// Called when an organ gets surgically removed (mob/living/user, mob/living/carbon/new_owner, target_zone, obj/item/tool)
#define COMSIG_ORGAN_SURGICALLY_INSERTED "organ_surgically_inserted"
/// Called when an organ finishes inserting into a bodypart (obj/item/bodypart/limb, movement_flags)
#define COMSIG_ORGAN_BODYPART_INSERTED "organ_bodypart_inserted"

///Called when movement intent is toggled.
#define COMSIG_MOVE_INTENT_TOGGLED "move_intent_toggled"
Expand Down Expand Up @@ -312,3 +316,6 @@
#define COMPONENT_NO_LOOT_DROP (1<<0)
/// From /datum/element/death_drops/on_death(mob/living/target, gibbed) : (list/loot, gibbed)
#define COMSIG_LIVING_DROPPED_LOOT "living_dropped_loot"

/// Sent to a mob when one of their bodypart's surgery state changes, OR sent from the basic_surgery_state holder when its surgery state changes (old_state, new_state, changed_states)
#define COMSIG_LIVING_UPDATING_SURGERY_STATE "carbon_updating_surgery_state"
7 changes: 7 additions & 0 deletions code/__DEFINES/dcs/signals/signals_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -577,3 +577,10 @@
/// Sent from /datum/wires/attach_assembly() : (atom/holder)
#define COMSIG_ASSEMBLY_PRE_ATTACH "assembly_pre_attach"
#define COMPONENT_CANCEL_ATTACH (1<<0)

/// Before an item has been equipped as a prosthetic limb
#define COMSIG_ITEM_PRE_USED_AS_PROSTHETIC "item_used_as_prosthetic"
/// After an item has been equipped as a prosthetic limb
#define COMSIG_ITEM_POST_USED_AS_PROSTHETIC "item_post_used_as_prosthetic"
/// Item has been unequipped from a mob as a prosthetic limb
#define COMSIG_ITEM_DROPPED_FROM_PROSTHETIC "item_dropped_from_prosthetic"
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_techweb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@

/// Called when a techweb design is removed (datum/design/removed_design, custom)
#define COMSIG_TECHWEB_REMOVE_DESIGN "techweb_remove_design"

/// Called when an experiment is completed (datum/experiment/completed_experiment,)
#define COMSIG_TECHWEB_EXPERIMENT_COMPLETED "techweb_experiment_completed"
2 changes: 2 additions & 0 deletions code/__DEFINES/diseases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ DEFINE_BITFIELD(visibility_flags, list(
#define CAN_CARRY (1<<1)
#define CAN_RESIST (1<<2)
#define CHRONIC (1<<3)
/// Instead of instantly curing the disease, cures will simply reduce the stage
#define INCREMENTAL_CURE (1<<4)

//Spread Flags
#define DISEASE_SPREAD_SPECIAL (1<<0)
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ DEFINE_BITFIELD(no_equip_flags, list(
//defines for the index of hands
#define LEFT_HANDS 1
#define RIGHT_HANDS 2
/// Checks if the value is "right" - same as ISEVEN, but used primarily for hand or foot index contexts
#define IS_RIGHT_INDEX(value) (value % 2 == 0)
/// Checks if the value is "left" - same as ISODD, but used primarily for hand or foot index contexts
#define IS_LEFT_INDEX(value) (value % 2 != 0)

//flags for female outfits: How much the game can safely "take off" the uniform without it looking weird
/// For when there's simply no need for a female version of this uniform.
Expand Down
8 changes: 1 addition & 7 deletions code/__DEFINES/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,9 @@

#define COLOR_BLOOD "#c90000"

/// Checks if the value is "left"
/// Used primarily for hand or foot indexes
#define IS_RIGHT(value) (value % 2 == 0)
/// Checks if the value is "right"
/// Used primarily for hand or foot indexes
#define IS_LEFT(value) (value % 2 != 0)
/// Helper for picking between left or right when given a value
/// Used primarily for hand or foot indexes
#define SELECT_LEFT_OR_RIGHT(value, left, right) (IS_LEFT(value) ? left : right)
#define SELECT_LEFT_OR_RIGHT(value, left, right) (IS_LEFT_INDEX(value) ? left : right)

// Used in ready menu anominity
/// Hide ckey
Expand Down
21 changes: 13 additions & 8 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@
#define MOB_PLANT (1 << 10)
///The mob is a goopy creature, probably coming from xenobiology.
#define MOB_SLIME (1 << 11)
///The mob is fish or water-related.
#define MOB_AQUATIC (1 << 12)
///The mob is a mining-related mob. It's the plasma, you see. Gets in ya bones.
#define MOB_MINING (1 << 13)
///The mob is a crustacean. Like crabs. Or lobsters.
#define MOB_CRUSTACEAN (1 << 14)
///The mob is all boney
#define MOB_SKELETAL (1 << 15)

//Lung respiration type flags
#define RESPIRATION_OXYGEN (1 << 0)
Expand All @@ -91,6 +99,8 @@
#define BODYTYPE_ALIEN (1<<3)
///The limb is from a golem
#define BODYTYPE_GOLEM (1<<4)
//The limb is a peg limb
#define BODYTYPE_PEG (1<<5)

// Bodyshape defines for how things can be worn, i.e., what "shape" the mob sprite is
///The limb fits the human mold. This is not meant to be literal, if the sprite "fits" on a human, it is "humanoid", regardless of origin.
Expand All @@ -102,7 +112,7 @@
///The limb is snouted.
#define BODYSHAPE_SNOUTED (1<<3)

#define BODYTYPE_BIOSCRAMBLE_INCOMPATIBLE (BODYTYPE_ROBOTIC | BODYTYPE_LARVA_PLACEHOLDER | BODYTYPE_GOLEM)
#define BODYTYPE_BIOSCRAMBLE_INCOMPATIBLE (BODYTYPE_ROBOTIC | BODYTYPE_LARVA_PLACEHOLDER | BODYTYPE_GOLEM | BODYTYPE_PEG)
#define BODYTYPE_CAN_BE_BIOSCRAMBLED(bodytype) (!(bodytype & BODYTYPE_BIOSCRAMBLE_INCOMPATIBLE))

// Defines for Species IDs. Used to refer to the name of a species, for things like bodypart names or species preferences.
Expand Down Expand Up @@ -144,6 +154,8 @@
#define BODYPART_ID_LARVA "larva"
#define BODYPART_ID_PSYKER "psyker"
#define BODYPART_ID_MEAT "meat"
#define BODYPART_ID_PEG "peg"


// Preferences for leg types
/// Legs that are normal
Expand Down Expand Up @@ -194,13 +206,6 @@

#define BRAIN_DAMAGE_INTEGRITY_MULTIPLIER 0.5

//Surgery Defines
#define BIOWARE_GENERIC "generic"
#define BIOWARE_NERVES "nerves"
#define BIOWARE_CIRCULATION "circulation"
#define BIOWARE_LIGAMENTS "ligaments"
#define BIOWARE_CORTEX "cortex"

//Health hud screws for carbon mobs
#define SCREWYHUD_NONE 0
#define SCREWYHUD_CRIT 1
Expand Down
6 changes: 5 additions & 1 deletion code/__DEFINES/reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@
// Reagent exposure methods.
/// Used for splashing.
#define TOUCH (1<<0)
/// Used for ingesting the reagents. Food, drinks, inhaling smoke.
/// Used for ingesting the reagents. Food and drinks.
#define INGEST (1<<1)
/// Used by foams, sprays, and blob attacks.
#define VAPOR (1<<2)
/// Used by medical patches and gels.
#define PATCH (1<<3)
/// Used for direct injection of reagents.
#define INJECT (1<<4)
/// Exclusive to just plumbing. if set we use the round robin technique else we use proportional
#define LINEAR (1<<5)
/// Used by smoke or inhaling from a source. Smoke, cigarettes, and inhalers.
#define INHALE (1<<6)

/// When returned by on_mob_life(), on_mob_dead(), overdose_start() or overdose_processed(), will cause the mob to updatehealth() afterwards
#define UPDATE_MOB_HEALTH 1
Expand Down
Loading
Loading