diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 317066f673..957f6edae4 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -54,7 +54,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define PASSCLOSEDTURF (1<<5) #define LETPASSTHROW (1<<6) - //Movement Types #define GROUND (1<<0) #define FLYING (1<<1) diff --git a/code/__DEFINES/interaction_flags.dm b/code/__DEFINES/interaction_flags.dm index 6df5bf77fb..dc3242c910 100644 --- a/code/__DEFINES/interaction_flags.dm +++ b/code/__DEFINES/interaction_flags.dm @@ -20,5 +20,3 @@ #define INTERACT_MACHINE_SET_MACHINE (1<<6) //MACHINES HAVE THIS BY DEFAULT, SOMEONE SHOULD RUN THROUGH MACHINES AND REMOVE IT FROM THINGS LIKE LIGHT SWITCHES WHEN POSSIBLE!!-------------------------- //This flag determines if a machine set_machine's the user when the user uses it, making updateUsrDialog make the user re-call interact() on it. //THIS FLAG IS ON ALL MACHINES BY DEFAULT, NEEDS TO BE RE-EVALUATED LATER!! - -#define INTERACT_GHOST_READ (1<<0) \ No newline at end of file diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index 831f73ac74..1c21e2d7b6 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -17,18 +17,19 @@ // Flags for the item_flags var on /obj/item -#define BEING_REMOVED (1<<0) -#define IN_INVENTORY (1<<1) //is this item equipped into an inventory slot or hand of a mob? used for tooltips -#define FORCE_STRING_OVERRIDE (1<<2) //used for tooltips -#define NEEDS_PERMIT (1<<3) //Used by security bots to determine if this item is safe for public use. -#define SLOWS_WHILE_IN_HAND (1<<4) -#define NO_MAT_REDEMPTION (1<<5) //Stops you from putting things like an RCD or other items into an ORM or protolathe for materials. -#define DROPDEL (1<<6) //When dropped, it calls qdel on itself -#define NOBLUDGEON (1<<7) //when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() -#define ABSTRACT (1<<8) //for all things that are technically items but used for various different stuff -#define IMMUTABLE_SLOW (1<<9) //When players should not be able to change the slowdown of the item (Speed potions, ect) -#define SURGICAL_TOOL (1<<10) //Tool commonly used for surgery: won't attack targets in an active surgical operation on help intent (in case of mistakes) -#define NO_UNIFORM_REQUIRED (1<<11) //Can be worn on certain slots (currently belt and id) that would otherwise require an uniform. +#define BEING_REMOVED (1<<0) +#define IN_INVENTORY (1<<1) //is this item equipped into an inventory slot or hand of a mob? used for tooltips +#define FORCE_STRING_OVERRIDE (1<<2) //used for tooltips +#define NEEDS_PERMIT (1<<3) //Used by security bots to determine if this item is safe for public use. +#define SLOWS_WHILE_IN_HAND (1<<4) +#define NO_MAT_REDEMPTION (1<<5) //Stops you from putting things like an RCD or other items into an ORM or protolathe for materials. +#define DROPDEL (1<<6) //When dropped, it calls qdel on itself +#define NOBLUDGEON (1<<7) //when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() +#define ABSTRACT (1<<8) //for all things that are technically items but used for various different stuff +#define IMMUTABLE_SLOW (1<<9) //When players should not be able to change the slowdown of the item (Speed potions, ect) +#define SURGICAL_TOOL (1<<10) //Tool commonly used for surgery: won't attack targets in an active surgical operation on help intent (in case of mistakes) +#define NO_UNIFORM_REQUIRED (1<<11) //Can be worn on certain slots (currently belt and id) that would otherwise require an uniform. +#define NO_ATTACK_CHAIN_SOFT_STAMCRIT (1<<12) //Entirely blocks melee_attack_chain() if user is soft stamcritted. Uses getStaminaLoss() to check at this point in time. // Flags for the clothing_flags var on /obj/item/clothing diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index cda19dbaac..e658c7d8e8 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -1,5 +1,9 @@ /obj/item/proc/melee_attack_chain(mob/user, atom/target, params) + if(item_flags & NO_ATTACK_CHAIN_SOFT_STAMCRIT) + if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) + to_chat(user, "You are too exhausted to swing [src]!") + return if(!tool_attack_chain(user, target) && pre_attack(target, user, params)) // Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example) var/resolved = target.attackby(src, user, params) @@ -112,7 +116,7 @@ send_item_attack_message(I, user) if(I.force) apply_damage(totitemdamage, I.damtype) //CIT CHANGE - replaces I.force with totitemdamage - if(I.damtype == BRUTE && !HAS_TRAIT(src, TRAIT_NOMARROW)) + if(I.damtype == BRUTE && !HAS_TRAIT(src, TRAIT_NOMARROW)) if(prob(33)) I.add_mob_blood(src) var/turf/location = get_turf(src) diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index 1bb1b8533a..3f70dc6e82 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -343,7 +343,7 @@ icon = 'icons/obj/items_and_weapons.dmi' icon_state = "disintegrate" item_state = null - item_flags = NEEDS_PERMIT | ABSTRACT | DROPDEL + item_flags = NEEDS_PERMIT | ABSTRACT | DROPDEL | NO_ATTACK_CHAIN_SOFT_STAMCRIT w_class = WEIGHT_CLASS_HUGE throwforce = 0 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 9740b4be04..6029fe302d 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -15,7 +15,7 @@ throw_speed = 3 throw_range = 5 force = 5 - item_flags = NEEDS_PERMIT + item_flags = NEEDS_PERMIT | NO_ATTACK_CHAIN_SOFT_STAMCRIT attack_verb = list("struck", "hit", "bashed") var/fire_sound = "gunshot"