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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions aurorastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@
#include "code\datums\datum.dm"
#include "code\datums\datumvars.dm"
#include "code\datums\feedback.dm"
#include "code\datums\hud.dm"
#include "code\datums\late_choices.dm"
#include "code\datums\local_network.dm"
#include "code\datums\mind.dm"
Expand Down Expand Up @@ -644,6 +645,7 @@
#include "code\game\atoms.dm"
#include "code\game\atoms_movable.dm"
#include "code\game\base_turf.dm"
#include "code\game\data_huds.dm"
#include "code\game\periodic_news.dm"
#include "code\game\shuttle_engines.dm"
#include "code\game\sound.dm"
Expand Down
46 changes: 40 additions & 6 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
@@ -1,12 +1,46 @@
#define SEC_HUDTYPE "security"
#define MED_HUDTYPE "medical"

// Consider these images/atoms as part of the UI/HUD (apart of the appearance_flags)
/// Used for progress bars and chat messages
#define APPEARANCE_UI_IGNORE_ALPHA (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE)
/// Used for HUD objects
#define APPEARANCE_UI (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|PIXEL_SCALE)

#define NO_HUD 0
#define SEC_HUD 1
#define MED_HUD 2
// for secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list
// note: if you add more HUDs, even for non-human atoms, make sure to use unique numbers for the defines!
// /datum/atom_hud expects these to be unique
// these need to be strings in order to make them associative lists

/// A simple line reading the pulse.
#define HEALTH_HUD "1"
/// Alive, dead, diseased, etc.
#define STATUS_HUD "2"
/// The job asigned to your ID.
#define ID_HUD "3"
/// Wanted, released, paroled, security status.
#define WANTED_HUD "4"
/// Loyality implant.
#define IMPLOYAL_HUD "5"
/// Chemical implant.
#define IMPCHEM_HUD "6"
/// Tracking implant.
#define IMPTRACK_HUD "7"
//for antag huds. these are used at the /mob level
#define ANTAG_HUD "8" // used to be SPECIALROLE_HUD

#define STATUS_HUD_OOC "9" // STATUS_HUD without virus DB check for someone being ill.

#define TRIAGE_HUD "10" //a HUD that creates a bar above the user showing their medical status

//by default everything in the hud_list of an atom is an image
//a value in hud_list with one of these will change that behavior
#define HUD_LIST_LIST 1

//data HUD (medhud, sechud) defines
//Don't forget to update human/New() if you change these!
#define DATA_HUD_SECURITY_BASIC 1
#define DATA_HUD_SECURITY_ADVANCED 2
#define DATA_HUD_MEDICAL_BASIC 3
#define DATA_HUD_MEDICAL_ADVANCED 4
#define DATA_HUD_ANTAG 5

/// cooldown for being shown the images for any particular data hud
#define ADD_HUD_TO_COOLDOWN 20
5 changes: 5 additions & 0 deletions code/__DEFINES/items_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,8 @@
#define INJECTION_FAIL 0
#define BASE_INJECTION_MOD 1 // x1 multiplier with no effects
#define SUIT_INJECTION_MOD 2 // x2 multiplier if target is wearing spacesuit

/// Wrapper for adding clothing based traits
#define ADD_CLOTHING_TRAIT(mob, trait) ADD_TRAIT(mob, trait, "[CLOTHING_TRAIT]_[REF(src)]")
/// Wrapper for removing clothing based traits
#define REMOVE_CLOTHING_TRAIT(mob, trait) REMOVE_TRAIT(mob, trait, "[CLOTHING_TRAIT]_[REF(src)]")
13 changes: 0 additions & 13 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,6 @@

#define ASFX_DEFAULT (ASFX_AMBIENCE | ASFX_FOOTSTEPS | ASFX_VOTE | ASFX_VOX | ASFX_DROPSOUND | ASFX_ARCADE | ASFX_RADIO | ASFX_INSTRUMENT | ASFX_HUM | ASFX_MUSIC | ASFX_CONSOLE_AMBIENCE)

// For secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list of humans.
#define HEALTH_HUD 1 // A simple line reading the pulse.
#define STATUS_HUD 2 // Alive, dead, diseased, etc.
#define ID_HUD 3 // The job asigned to your ID.
#define WANTED_HUD 4 // Wanted, released, paroled, security status.
#define IMPLOYAL_HUD 5 // Loyality implant.
#define IMPCHEM_HUD 6 // Chemical implant.
#define IMPTRACK_HUD 7 // Tracking implant.
#define SPECIALROLE_HUD 8 // AntagHUD image.
#define STATUS_HUD_OOC 9 // STATUS_HUD without virus DB check for someone being ill.
#define LIFE_HUD 10 // STATUS_HUD that only reports dead or alive
#define TRIAGE_HUD 11 // a HUD that creates a bar above the user showing their medical status

// Shuttles.

// These define the time taken for the shuttle to get to the space station, and the time before it leaves again.
Expand Down
9 changes: 5 additions & 4 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
#define GRAB_UPGRADING 4
#define GRAB_KILL 5

#define BORGMESON 0x1
#define BORGTHERM 0x2
#define BORGXRAY 0x4
#define BORGMATERIAL 8
#define NO_HUD BITFLAG(0)
#define BORGMESON BITFLAG(1)
#define BORGTHERM BITFLAG(2)
#define BORGXRAY BITFLAG(3)
#define BORGMATERIAL BITFLAG(4)

#define HOSTILE_STANCE_IDLE 1
#define HOSTILE_STANCE_ALERT 2
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@
* Raised on an entity whose liver is attempting to filter blood.
*/
#define COMSIG_LIVER_FILTER_EVENT "liver_filter_event"

/// Wrapper for adding organ based traits
#define ADD_ORGAN_TRAIT(mob, trait) ADD_TRAIT(mob, trait, "[ORGAN_TRAIT]_[REF(src)]")
/// Wrapper for removing organ based traits
#define REMOVE_ORGAN_TRAIT(mob, trait) REMOVE_TRAIT(mob, trait, "[ORGAN_TRAIT]_[REF(src)]")
29 changes: 28 additions & 1 deletion code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,26 @@
: 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)

#define ADD_TRAITS(target, list_of_traits, source) \
do { \
var/list/_LT = list_of_traits; \
if (list_of_traits && !islist(list_of_traits)) { \
_LT = list(list_of_traits); \
}; \
for (var/_TR in _LT) { \
ADD_TRAIT(target, _TR, source);\
}; \
} while (0)
#define REMOVE_TRAITS(target, list_of_traits, source) \
do { \
var/list/_LT = list_of_traits; \
if (list_of_traits && !islist(list_of_traits)) { \
_LT = list(list_of_traits); \
}; \
for (var/_TR in _LT) { \
REMOVE_TRAIT(target, _TR, source);\
}; \
} while (0)
// common trait sources
#define TRAIT_GENERIC "generic"
#define GENERIC_ITEM_TRAIT "generic_item"
Expand Down Expand Up @@ -216,3 +235,11 @@

/// Trait given when the mob lies down.
#define TRAIT_SOURCE_LYING_DOWN "lying_down"

#define CLOTHING_TRAIT "clothing"

#define TRAIT_MEDICAL_HUD "med_hud"
#define TRAIT_SECURITY_HUD "sec_hud"
#define TRAIT_ANTAG_HUD "antag_hud"

#define ORGAN_TRAIT "organ"
23 changes: 0 additions & 23 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,29 +147,6 @@
if(70 to INFINITY) return "elderly"
else return "unknown"

/proc/RoundHealth(health)
switch(health)
if(100 to INFINITY)
return "health100"
if(90 to 100)
return "health95"
if(70 to 90)
return "health80"
if(50 to 70)
return "health60"
if(30 to 50)
return "health40"
if(18 to 30)
return "health25"
if(5 to 18)
return "health10"
if(1 to 5)
return "health1"
if(-99 to 0)
return "health0"
else
return "health-100"

/*
Proc for attack log creation, because really why not
1 argument is the actor
Expand Down
4 changes: 1 addition & 3 deletions code/controllers/subsystems/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,7 @@ SUBSYSTEM_DEF(jobs)
// So shoes aren't silent if people never change 'em.
H.update_noise_level()

BITSET(H.hud_updateflag, ID_HUD)
BITSET(H.hud_updateflag, IMPLOYAL_HUD)
BITSET(H.hud_updateflag, SPECIALROLE_HUD)


var/obj/item/clothing/under/uniform = H.w_uniform
if(istype(uniform) && uniform.has_sensor)
Expand Down
Loading
Loading