Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aura rework into mob modifiers. #4818

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__defines/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define HUD_FIRE /decl/hud_element/fire
#define HUD_CHARGE /decl/hud_element/charge
#define HUD_ROBOT_MODULE /decl/hud_element/module_selection
#define HUD_MODIFIERS /decl/hud_element/modifiers

#define GET_HUD_ALERT(M, A) ((istype(M?.hud_used, /datum/hud) && (A in M.hud_used.alerts)) ? M.hud_used.alerts[A] : 0)
#define CLEAR_HUD_ALERTS(M) if(istype(M?.hud_used, /datum/hud) && M.hud_used.alerts) { M.hud_used.alerts = null; }
Expand Down
11 changes: 11 additions & 0 deletions code/__defines/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,14 @@
// Default UI style applied to client prefs.
#define DEFAULT_UI_STYLE /decl/ui_style/midnight

// Indicates a modifier will never expire.
#define MOB_MODIFIER_INDEFINITE (-1)

// Indicators for attack checking proc.
#define MM_ATTACK_TYPE_WEAPON 0
#define MM_ATTACK_TYPE_THROWN 1
#define MM_ATTACK_TYPE_PROJECTILE 2

#define MM_ATTACK_RESULT_NONE 0
#define MM_ATTACK_RESULT_DEFLECTED BITFLAG(0)
#define MM_ATTACK_RESULT_BLOCKED BITFLAG(1)
4 changes: 2 additions & 2 deletions code/__defines/mob_status.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define PENDING_STATUS(MOB, COND) (LAZYACCESS(MOB.pending_status_counters, COND) || LAZYACCESS(MOB.status_counters, COND))
#define GET_STATUS(MOB, COND) (LAZYACCESS(MOB.status_counters, COND))
#define HAS_STATUS(MOB, COND) (GET_STATUS(MOB, COND) > 0)
#define ADJ_STATUS(MOB, COND, AMT) (MOB.set_status(COND, PENDING_STATUS(MOB, COND) + AMT))
#define SET_STATUS_MAX(MOB, COND, AMT) (MOB.set_status(COND, max(PENDING_STATUS(MOB, COND), AMT)))
#define ADJ_STATUS(MOB, COND, AMT) (MOB.set_status_condition(COND, PENDING_STATUS(MOB, COND) + AMT))
#define SET_STATUS_MAX(MOB, COND, AMT) (MOB.set_status_condition(COND, max(PENDING_STATUS(MOB, COND), AMT)))
16 changes: 3 additions & 13 deletions code/__defines/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define UNCONSCIOUS 1
#define DEAD 2

// Bitflags defining which status effects could be or are inflicted on a mob.
// Bitflags defining which status conditions could be or are inflicted on a mob.
#define CANSTUN BITFLAG(0)
#define CANWEAKEN BITFLAG(1)
#define CANPARALYSE BITFLAG(2)
Expand Down Expand Up @@ -278,17 +278,6 @@
#define SURGERY_RETRACTED 2
#define SURGERY_ENCASED 3

#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"

#define SPECIES_BLOOD_DEFAULT 560

#define SLIME_EVOLUTION_THRESHOLD 15
Expand Down Expand Up @@ -387,7 +376,8 @@ var/global/list/dexterity_levels = list(
#define HO_HANDCUFF_LAYER 25
#define HO_INHAND_LAYER 26
#define HO_FIRE_LAYER 27 //If you're on fire
#define TOTAL_OVER_LAYERS 27
#define HO_EFFECT_LAYER 28
#define TOTAL_OVER_LAYERS 28
//////////////////////////////////

// Underlay defines; vestigal implementation currently.
Expand Down
13 changes: 0 additions & 13 deletions code/__defines/xenoarcheaology.dm
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
#define XENOFIND_APPLY_PREFIX BITFLAG(0)
#define XENOFIND_APPLY_DECOR BITFLAG(1)
#define XENOFIND_REPLACE_ICON BITFLAG(2)

#define EFFECT_TOUCH 0
#define EFFECT_AURA 1
#define EFFECT_PULSE 2
#define MAX_EFFECT 2

#define EFFECT_UNKNOWN 0
#define EFFECT_ENERGY 1
#define EFFECT_PSIONIC 2
#define EFFECT_ELECTRO 3
#define EFFECT_PARTICLE 4
#define EFFECT_ORGANIC 5
#define EFFECT_SYNTH 6
4 changes: 2 additions & 2 deletions code/_macros.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@

#define JOINTEXT(X) jointext(X, null)

#define SPAN_STYLE(S, X) "<span style='[S]'>[X]</span>"
#define SPAN_STYLE(S, X) "<span style='" + S + "'>" + X + "</span>"
#define SPAN_CLASS(C, X) "<span class='" + C + "'>" + X + "</span>"

#define SPAN_CLASS(C, X) "<span class='[C]'>[X]</span>"
#define SPAN_ITALIC(X) SPAN_CLASS("italic", X)
#define SPAN_BOLD(X) SPAN_CLASS("bold", X)
#define SPAN_NOTICE(X) SPAN_CLASS("notice", X)
Expand Down
3 changes: 3 additions & 0 deletions code/_onclick/hud/hud_elements/hud_auxilliary.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
/decl/hud_element/attack
elem_type = /obj/screen/default_attack_selector

/decl/hud_element/modifiers
elem_type = /obj/screen/mob_modifiers

/decl/hud_element/stamina
elem_type = /obj/screen/stamina
elem_updates_in_life = TRUE
Expand Down
Loading
Loading