Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
24 changes: 20 additions & 4 deletions aurorastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "code\__DEFINES\_flags.dm"
#include "code\__DEFINES\_helpers.dm"
#include "code\__DEFINES\_macros.dm"
#include "code\__DEFINES\_mobs.dm"
#include "code\__DEFINES\_protect.dm"
#include "code\__DEFINES\_tick.dm"
#include "code\__DEFINES\_unit_tests.dm"
Expand Down Expand Up @@ -69,6 +70,7 @@
#include "code\__DEFINES\ghostspawner.dm"
#include "code\__DEFINES\global.dm"
#include "code\__DEFINES\grab.dm"
#include "code\__DEFINES\grabs.dm"
#include "code\__DEFINES\gradient.dm"
#include "code\__DEFINES\guns.dm"
#include "code\__DEFINES\hallucinations.dm"
Expand Down Expand Up @@ -98,7 +100,6 @@
#include "code\__DEFINES\minimap.dm"
#include "code\__DEFINES\mining.dm"
#include "code\__DEFINES\misc.dm"
#include "code\__DEFINES\mobs.dm"
#include "code\__DEFINES\modular_guns.dm"
#include "code\__DEFINES\move_force.dm"
#include "code\__DEFINES\movement.dm"
Expand Down Expand Up @@ -280,6 +281,7 @@
#include "code\_globalvars\edible.dm"
#include "code\_globalvars\logging.dm"
#include "code\_globalvars\tgui.dm"
#include "code\_globalvars\lists\clothing.dm"
#include "code\_globalvars\lists\mapping.dm"
#include "code\_globalvars\lists\mobs.dm"
#include "code\_globalvars\lists\names.dm"
Expand Down Expand Up @@ -644,6 +646,7 @@
#include "code\game\ambience.dm"
#include "code\game\atoms.dm"
#include "code\game\atoms_movable.dm"
#include "code\game\atoms_movable_grabs.dm"
#include "code\game\base_turf.dm"
#include "code\game\periodic_news.dm"
#include "code\game\shuttle_engines.dm"
Expand Down Expand Up @@ -1094,7 +1097,6 @@
#include "code\game\machinery\vending\soda.dm"
#include "code\game\machinery\vending\wardrobe.dm"
#include "code\game\modifiers\modifiers.dm"
#include "code\game\objects\buckling.dm"
#include "code\game\objects\empulse.dm"
#include "code\game\objects\explosion.dm"
#include "code\game\objects\items.dm"
Expand Down Expand Up @@ -2597,8 +2599,7 @@
#include "code\modules\mob\logout.dm"
#include "code\modules\mob\mob.dm"
#include "code\modules\mob\mob_defines.dm"
#include "code\modules\mob\mob_grab.dm"
#include "code\modules\mob\mob_grab_specials.dm"
#include "code\modules\mob\mob_grabs.dm"
#include "code\modules\mob\mob_helpers.dm"
#include "code\modules\mob\mob_movement.dm"
#include "code\modules\mob\mob_transformation_simple.dm"
Expand Down Expand Up @@ -2635,6 +2636,16 @@
#include "code\modules\mob\abstract\new_player\preferences_setup.dm"
#include "code\modules\mob\abstract\new_player\sprite_accessories.dm"
#include "code\modules\mob\abstract\unauthed\login.dm"
#include "code\modules\mob\grab\grab_object.dm"
#include "code\modules\mob\grab\grab_singleton.dm"
#include "code\modules\mob\grab\normal\grab_normal.dm"
#include "code\modules\mob\grab\normal\norm_aggressive.dm"
#include "code\modules\mob\grab\normal\norm_kill.dm"
#include "code\modules\mob\grab\normal\norm_neck.dm"
#include "code\modules\mob\grab\normal\norm_passive.dm"
#include "code\modules\mob\grab\normal\norm_struggle.dm"
#include "code\modules\mob\grab\simple\simple_control.dm"
#include "code\modules\mob\grab\simple\simple_passive.dm"
#include "code\modules\mob\language\generic.dm"
#include "code\modules\mob\language\language.dm"
#include "code\modules\mob\language\monkey.dm"
Expand All @@ -2646,10 +2657,13 @@
#include "code\modules\mob\living\damage_procs.dm"
#include "code\modules\mob\living\default_language.dm"
#include "code\modules\mob\living\init_signals.dm"
#include "code\modules\mob\living\inventory.dm"
#include "code\modules\mob\living\life.dm"
#include "code\modules\mob\living\living.dm"
#include "code\modules\mob\living\living_attackhand.dm"
#include "code\modules\mob\living\living_defense.dm"
#include "code\modules\mob\living\living_defines.dm"
#include "code\modules\mob\living\living_grabs.dm"
#include "code\modules\mob\living\living_maneuvers.dm"
#include "code\modules\mob\living\living_powers.dm"
#include "code\modules\mob\living\login.dm"
Expand Down Expand Up @@ -2724,6 +2738,7 @@
#include "code\modules\mob\living\carbon\human\species\species.dm"
#include "code\modules\mob\living\carbon\human\species\species_attack.dm"
#include "code\modules\mob\living\carbon\human\species\species_damage.dm"
#include "code\modules\mob\living\carbon\human\species\species_disarm.dm"
#include "code\modules\mob\living\carbon\human\species\species_hud.dm"
#include "code\modules\mob\living\carbon\human\species\outsider\revenant.dm"
#include "code\modules\mob\living\carbon\human\species\outsider\undead.dm"
Expand Down Expand Up @@ -3052,6 +3067,7 @@
#include "code\modules\ntsl2\ntsl2_program.dm"
#include "code\modules\ntsl2\ntsl2_types.dm"
#include "code\modules\organs\blood.dm"
#include "code\modules\organs\diagnostics.dm"
#include "code\modules\organs\misc.dm"
#include "code\modules\organs\organ.dm"
#include "code\modules\organs\organ_external.dm"
Expand Down
2 changes: 1 addition & 1 deletion code/ZAS/Airflow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Contains helper procs for airflow, handled in /connection_group.
return 0
if(buckled_to)
return 0
var/obj/item/shoes = get_equipped_item(slot_shoes)
var/obj/item/shoes = get_equipped_item(slot_shoes_str)
if(istype(shoes) && (shoes.item_flags & ITEM_FLAG_NO_SLIP))
return 0
return 1
Expand Down
8 changes: 8 additions & 0 deletions code/__DEFINES/mobs.dm → code/__DEFINES/_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
#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_BY_DEPTH list(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM, BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG, BP_GROIN, BP_CHEST)
#define BP_IS_ROBOTIC(org) (org.status & ORGAN_ROBOT)

#define ROBOTIC_NONE 0
Expand All @@ -123,6 +124,11 @@
#define BP_STOMACH "stomach"
#define BP_APPENDIX "appendix"

/// Special organ tags
#define BP_L_HAND_UPPER "l_u_hand"
#define BP_R_HAND_UPPER "r_u_hand"
#define BP_M_HAND "midlimb"

//Vaurca organs
#define BP_NEURAL_SOCKET "neural socket"
#define BP_PHORON_RESERVE "phoron reserve tank"
Expand Down Expand Up @@ -365,6 +371,8 @@
#define INCAPACITATION_FORCELYING 16
#define INCAPACITATION_KNOCKOUT 32

#define INCAPACITATION_UNRESISTING (INCAPACITATION_KNOCKOUT|INCAPACITATION_STUNNED)
#define INCAPACITATION_DISRUPTED (INCAPACITATION_UNRESISTING|INCAPACITATION_WEAKENED)
#define INCAPACITATION_KNOCKDOWN (INCAPACITATION_KNOCKOUT|INCAPACITATION_FORCELYING)
#define INCAPACITATION_DISABLED (INCAPACITATION_KNOCKDOWN|INCAPACITATION_STUNNED)
#define INCAPACITATION_DEFAULT (INCAPACITATION_RESTRAINED|INCAPACITATION_BUCKLED_FULLY|INCAPACITATION_DISABLED)
Expand Down
7 changes: 3 additions & 4 deletions code/__DEFINES/damage_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@
// Limb behaviour defines.
#define ORGAN_CAN_AMPUTATE (1<<0) //Can this organ be amputated?
#define ORGAN_CAN_BREAK (1<<1) //Can this organ break?
#define ORGAN_CAN_GRASP (1<<2) //Can this organ grasp things?
#define ORGAN_CAN_STAND (1<<3) //Can this organ allow you to stand?
#define ORGAN_CAN_MAIM (1<<4) //Can this organ be maimed?
#define ORGAN_HAS_TENDON (1<<5) //Does this organ have tendons?
#define ORGAN_CAN_STAND (1<<2) //Can this organ allow you to stand?
#define ORGAN_CAN_MAIM (1<<3) //Can this organ be maimed?
#define ORGAN_HAS_TENDON (1<<4) //Does this organ have tendons?

#define TENDON_BRUISED (1<<0)
#define TENDON_CUT (1<<1)
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
/// updates sprites
#define COMSIG_ITEM_ICON_UPDATE "icon_update"

#define COMSIG_ORGAN_DISMEMBERED "organ_dismembered"

// tgui signals
#define COMSIG_TGUI_CLOSE "tgui_close"

Expand Down
4 changes: 3 additions & 1 deletion code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ GLOBAL_LIST_INIT(mimic_defines, list("ZM_MIMIC_BELOW",
#define MOVABLE_FLAG_EFFECTMOVE FLAG(2)
///Shuttle transition will delete this.
#define MOVABLE_FLAG_DEL_SHUTTLE FLAG(3)
/// Movable has reduced stamina cost/speed reduction when pulled.
#define MOVABLE_FLAG_WHEELED BITFLAG(4)

// Obj flags

Expand All @@ -85,7 +87,7 @@ GLOBAL_LIST_INIT(mimic_defines, list("ZM_MIMIC_BELOW",
#define ITEM_FLAG_NO_BLUDGEON FLAG(0)
/// Does not get contaminated by phoron.
#define ITEM_FLAG_PHORON_GUARD FLAG(1)
/// Prevents syringes, parapens and hyposprays if equiped to slot_suit or slot_head.
/// Prevents syringes, parapens and hyposprays if equiped to slot_suit or slot_head_str.
#define ITEM_FLAG_THICK_MATERIAL FLAG(2)
/// Functions with internals
#define ITEM_FLAG_AIRTIGHT FLAG(3)
Expand Down
17 changes: 17 additions & 0 deletions code/__DEFINES/grabs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#define GRAB_STOP_MOVE BITFLAG(0) // Stops the grabbed person from moving.
#define GRAB_FORCE_STAND BITFLAG(1) // Forces the grabbed person to stand.
#define GRAB_REVERSE_FACING BITFLAG(2) // Forces the grabbed person to face away from the assailant.
#define GRAB_LING_ABSORB BITFLAG(3) // Grab is strong enough to allow a changeling to absorb.
#define GRAB_SHIELDS_YOU BITFLAG(4) // Grabbed person shields the assailant from bullets.
#define GRAB_SHARE_TILE BITFLAG(5) // Grabbed person shares the same tile as the assailant.
#define GRAB_LADDER_CARRY BITFLAG(6) // Grabbed person can be carried up and down ladders.
#define GRAB_CAN_THROW BITFLAG(7) // Grabbed person can be thrown by the grabber.
#define GRAB_DOWNGRADE_ACT BITFLAG(8) // Performing actions while grabbing forces a downgrade.
#define GRAB_DOWNGRADE_MOVE BITFLAG(9) // Movement while grabbing forces a downgrade.
#define GRAB_FORCE_HARM BITFLAG(10) // Grabbed person can be forced to harm themselves.
#define GRAB_RESTRAINS BITFLAG(11) // Grabbed person is restrained, as in handcuffs.
#define GRAB_BLOCK_RESIST BITFLAG(12) // Grabbed person cannot cause a grab downgrade by resisting.
#define GRAB_CAN_SELFGRAB BITFLAG(13) // You can grab yourself.
#define GRAB_CAN_KILL BITFLAG(14) // Basically just means "is this GRAB_KILL" under the old system. Allows you to do things that will Definitely Kill People.

#define HAS_GRAB_FLAGS(GRABOBJ, GRABFLAGS) (GRABOBJ.current_grab.grab_flags & GRABFLAGS)
65 changes: 35 additions & 30 deletions code/__DEFINES/items_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,10 @@
#define ALWAYSDRAW 0x2000//If set, this item is always rendered even if its slot is hidden by other clothing
//Note that the item may still not be visible if its sprite is actually covered up.

// Slots.
#define slot_first 1
#define slot_back 2
#define slot_wear_mask 3
#define slot_handcuffed 4
#define slot_l_hand 5
#define slot_r_hand 6
#define slot_belt 7
#define slot_wear_id 8
#define slot_l_ear 9
#define slot_glasses 10
#define slot_gloves 11
#define slot_head 12
#define slot_shoes 13
#define slot_wear_suit 14
#define slot_w_uniform 15
#define slot_l_store 16
#define slot_r_store 17
#define slot_s_store 18
#define slot_in_backpack 19
#define slot_legcuffed 20
#define slot_r_ear 21
#define slot_pants 22
#define slot_tie 23
#define slot_in_belt 24
#define slot_wrists 25
#define slot_last 26 //for the love of god, keep this updated or you won't be able to unequip things

// Inventory slot strings.
// since numbers cannot be used as associative list keys.
//icon_back, icon_l_hand, etc would be much better names for these...
#define slot_back_str "slot_back"
#define slot_l_hand_str "slot_l_hand"
#define slot_r_hand_str "slot_r_hand"
#define slot_wear_id_str "slot_wear_id"
#define slot_w_uniform_str "slot_w_uniform"
#define slot_s_store_str "slot_s_store"
Expand All @@ -88,6 +58,41 @@
#define slot_wrists_str "slot_wrists"
#define slot_gloves_str "slot_gloves"
#define slot_tail_str "slot_tail"
#define slot_handcuffed_str "slot_handcuffed"
#define slot_l_store_str "slot_l_store"
#define slot_r_store_str "slot_r_store"
#define slot_legcuffed_str "slot_legcuffed"
#define slot_tie_str "slot_tie"

// fake slots
#define slot_in_backpack_str "slot_in_backpack"
#define slot_in_belt_str "slot_in_belt"

GLOBAL_LIST_INIT(all_inventory_slots, list(
slot_back_str,
BP_L_HAND,
BP_R_HAND,
slot_wear_id_str,
slot_w_uniform_str,
slot_s_store_str,
slot_head_str,
slot_glasses_str,
slot_wear_mask_str,
slot_belt_str,
slot_wear_suit_str,
slot_l_ear_str,
slot_r_ear_str,
slot_pants_str,
slot_shoes_str,
slot_wrists_str,
slot_gloves_str,
slot_tail_str,
slot_handcuffed_str,
slot_l_store_str,
slot_r_store_str,
slot_legcuffed_str,
slot_tie_str,
))

//itemstate suffixes. Used for containedsprite worn items
#define WORN_LHAND "_lh"
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,9 @@
/atom/proc/reset_plane_and_layer()
plane = initial(plane)
layer = initial(layer)

/atom/proc/reset_offsets(anim_time = 2)
pixel_w = initial(pixel_w)
pixel_x = initial(pixel_x)
pixel_y = initial(pixel_y)
pixel_z = initial(pixel_z)
4 changes: 0 additions & 4 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,6 @@ example:
#define MICROWAVE 1 << 7

// Cooking misc.
// can_insert return values
#define CANNOT_INSERT 0
#define CAN_INSERT 1
#define INSERT_GRABBED 2
// check_contents return values
#define CONTAINER_EMPTY 0
#define CONTAINER_SINGLE 1
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#define SOCKET_SHIELDED 1
#define SOCKET_FULLSHIELDED 2

#define GET_EXTERNAL_ORGAN(M, OTAG) M.get_organ(OTAG, /obj/item/organ/external)
#define GET_INTERNAL_ORGAN(M, OTAG) M.get_organ(OTAG, /obj/item/organ/internal)

// Heart signals
/**
* Raised on an entity whose heart is attempting to pump blood.
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@
: FALSE)\
: FALSE)
#define HAS_TRAIT_NOT_FROM(target, trait, source) (target.status_traits ? (target.status_traits[trait] ? (length(target.status_traits[trait] - source) > 0) : FALSE) : FALSE)
/// Returns a list of trait sources for this trait.
#define GET_TRAIT_SOURCES(target, trait) (target.status_traits?[trait] || list())

// common trait sources
#define TRAIT_GENERIC "generic"
Expand Down Expand Up @@ -218,5 +220,8 @@
/// Trait given when the mob lies down.
#define TRAIT_SOURCE_LYING_DOWN "lying_down"

/// Gloves give you an instant aggressive grab
#define TRAIT_AGGRESSIVE_GRAB "aggressive_grab"

/// A trait gained by leaning against something
#define TRAIT_LEANING "leaning"
7 changes: 1 addition & 6 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,7 @@ Proc for attack log creation, because really why not
return (thing in R.module.modules)

/proc/get_exposed_defense_zone(var/atom/movable/target)
var/obj/item/grab/G = locate() in target
if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people.
return pick(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG)
else
return pick(BP_CHEST, BP_GROIN)

return pick(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG, BP_CHEST, BP_GROIN)

// Returns true if M was not already in the dead mob list
/mob/proc/switch_from_living_to_dead_mob_list()
Expand Down
3 changes: 3 additions & 0 deletions code/__HELPERS/spatial_info.dm
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@

return atoms

/proc/get_dist_3d(atom/Loc1, atom/Loc2)
return max(abs(Loc1.x-Loc2.x), abs(Loc1.y-Loc2.y), abs(Loc1.z-Loc2.z))

///Returns the distance between two atoms
/proc/get_dist_euclidian(atom/first_location as turf|mob|obj, atom/second_location as turf|mob|obj)
var/dx = first_location.x - second_location.x
Expand Down
31 changes: 0 additions & 31 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -850,37 +850,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
mobs += M
return mobs


/proc/parse_zone(zone)
if(zone == BP_R_HAND) return "right hand"
else if (zone == BP_L_HAND) return "left hand"
else if (zone == BP_L_ARM) return "left arm"
else if (zone == BP_R_ARM) return "right arm"
else if (zone == BP_L_LEG) return "left leg"
else if (zone == BP_R_LEG) return "right leg"
else if (zone == BP_L_FOOT) return "left foot"
else if (zone == BP_R_FOOT) return "right foot"
else if (zone == BP_L_HAND) return "left hand"
else if (zone == BP_R_HAND) return "right hand"
else if (zone == BP_L_FOOT) return "left foot"
else if (zone == BP_R_FOOT) return "right foot"
else return zone

/proc/reverse_parse_zone(zone)
if(zone == "right hand") return BP_R_HAND
else if (zone == "left hand") return BP_L_HAND
else if (zone == "left arm") return BP_L_ARM
else if (zone == "right arm") return BP_R_ARM
else if (zone == "left leg") return BP_L_LEG
else if (zone == "right leg") return BP_R_LEG
else if (zone == "left foot") return BP_L_FOOT
else if (zone == "right foot") return BP_R_FOOT
else if (zone == "left hand") return BP_L_HAND
else if (zone == "right hand") return BP_R_HAND
else if (zone == "left foot") return BP_L_FOOT
else if (zone == "right foot") return BP_R_FOOT
else return zone

/proc/get(atom/loc, type)
while(loc)
if(istype(loc, type))
Expand Down
Loading