Skip to content

Commit

Permalink
mesh with modsuits
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsar-Salat committed Jan 19, 2025
1 parent 0a7a4ca commit e72e437
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
#include "code\__DEFINES\multi_z.dm"
#include "code\__DEFINES\nanites.dm"
#include "code\__DEFINES\networks.dm"
#include "code\__DEFINES\nitrile.dm"
#include "code\__DEFINES\obj_flags.dm"
#include "code\__DEFINES\orbit_defines.dm"
#include "code\__DEFINES\overlays.dm"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/nitrile.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define NITRILE_GLOVES_MULTIPLIER 0.5
///multiplies the time of do_after by NITRILE_GLOVES_MULTIPLIER if the user has the TRAIT_FASTMED
#define CHEM_INTERACT_DELAY(delay, user) HAS_TRAIT(user, TRAIT_FASTMED) ? (delay * NITRILE_GLOVES_MULTIPLIER) : delay
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_EASYLIMBDISABLE "easy_limb_disable"
#define TRAIT_TOXINLOVER "toxinlover"
#define TRAIT_NOHAIRLOSS "no_hair_loss"
/// reduces the use time of syringes, pills, patches and medigels but only when using on someone
#define TRAIT_FASTMED "fast_med_use"
#define TRAIT_NOBREATH "no_breath"
#define TRAIT_SEE_ANTIMAGIC "see_anti_magic"
#define TRAIT_DEPRESSION "depression"
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_EASYLIMBDISABLE" = TRAIT_EASYLIMBDISABLE,
"TRAIT_TOXINLOVER" = TRAIT_TOXINLOVER,
"TRAIT_NOHAIRLOSS" = TRAIT_NOHAIRLOSS,
"TRAIT_FASTMED" = TRAIT_FASTMED,
"TRAIT_NOBREATH" = TRAIT_NOBREATH,
"TRAIT_SEE_ANTIMAGIC" = TRAIT_SEE_ANTIMAGIC,
"TRAIT_DEPRESSION" = TRAIT_DEPRESSION,
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/reagent_containers/pill.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
else
M.visible_message("<span class='danger'>[user] attempts to force [M] to [apply_method] [src].</span>", \
"<span class='userdanger'>[user] attempts to force you to [apply_method] [src].</span>")
if(!do_after(user, 3 SECONDS, target = M))
if(!do_after(user, CHEM_INTERACT_DELAY(3 SECONDS, user), M))
return FALSE
M.visible_message("<span class='danger'>[user] forces [M] to [apply_method] [src].</span>", \
"<span class='userdanger'>[user] forces you to [apply_method] [src].</span>")
Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/reagent_containers/syringes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
if(living_target != user)
living_target.visible_message("<span class='danger'>[user] is trying to inject [living_target]!</span>", \
"<span class='userdanger'>[user] is trying to inject you!</span>")
if(!do_after(user, 3 SECONDS, living_target, extra_checks = CALLBACK(living_target, TYPE_PROC_REF(/mob/living, try_inject), user, null, INJECT_TRY_SHOW_ERROR_MESSAGE)))
if(!do_after(user, CHEM_INTERACT_DELAY(3 SECONDS, user), living_target, extra_checks = CALLBACK(living_target, TYPE_PROC_REF(/mob/living, try_inject), user, null, INJECT_TRY_SHOW_ERROR_MESSAGE)))
return
if(!reagents.total_volume)
return
Expand Down Expand Up @@ -119,7 +119,7 @@
target.visible_message("<span class='danger'>[user] is trying to take a blood sample from [target]!</span>", \
"<span class='userdanger'>[user] is trying to take a blood sample from you!</span>")
busy = TRUE
if(!do_after(user, 3 SECONDS, target, extra_checks = CALLBACK(living_target, TYPE_PROC_REF(/mob/living, try_inject), user, null, INJECT_TRY_SHOW_ERROR_MESSAGE)))
if(!do_after(user, CHEM_INTERACT_DELAY(3 SECONDS, user), target, extra_checks = CALLBACK(living_target, TYPE_PROC_REF(/mob/living, try_inject), user, null, INJECT_TRY_SHOW_ERROR_MESSAGE)))
busy = FALSE
return SECONDARY_ATTACK_CONTINUE_CHAIN
if(reagents.total_volume >= reagents.maximum_volume)
Expand Down

0 comments on commit e72e437

Please sign in to comment.