Skip to content

Commit

Permalink
Merge branch 'master' into Magic-Rework-Part-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Wollywoger authored Nov 22, 2024
2 parents fa0e9dc + c235908 commit 0d41281
Show file tree
Hide file tree
Showing 6 changed files with 311 additions and 99 deletions.
4 changes: 2 additions & 2 deletions code/__DEFINES/bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
/// A mutiplication of the burn and brute damage that the limb's stored damage contributes to its attached mob's overall wellbeing.
/// For instance, if a limb has 50 damage, and has a coefficient of 50%, the human is considered to have suffered 25 damage to their total health.

#define LIMB_BODY_DAMAGE_COEFFICIENT_ADVANCED 0.5 //Used by advanced robotic limbs.
#define LIMB_BODY_DAMAGE_COEFFICIENT_ADVANCED 0.66 //Used by advanced robotic limbs.
#define LIMB_BODY_DAMAGE_COEFFICIENT_DEFAULT 0.75 //Used by all limbs by default.
#define LIMB_BODY_DAMAGE_COEFFICIENT_TOTAL 1 //Used by heads and torsos
#define LIMB_BODY_DAMAGE_COEFFICIENT_PROSTHESIS 2.5 //Used by surplus prosthesis limbs
#define LIMB_BODY_DAMAGE_COEFFICIENT_PROSTHESIS 1.5 //Used by surplus prosthesis limbs

// EMP
// Note most of these values are doubled on heavy EMP
Expand Down
1 change: 1 addition & 0 deletions code/datums/dna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ GLOBAL_LIST_INIT(identity_block_lengths, list(
GLOBAL_LIST_INIT(features_block_lengths, list(
"[DNA_MUTANT_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
"[DNA_ETHEREAL_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR,
"[DNA_FEATHER_COLOR_BLOCK]" = DNA_BLOCK_SIZE_COLOR, // NON-MODULE CHANGE
))

/**
Expand Down
23 changes: 22 additions & 1 deletion code/game/atom/atom_examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@
return

var/mob/viewer = usr
var/mob/wearer = get(src, /mob/living) || loc
if(viewer.incapacitated(IGNORE_STASIS|IGNORE_RESTRAINTS|IGNORE_GRAB))
return
if(HAS_TRAIT(loc, TRAIT_UNKNOWN) || !(viewer in viewers(loc)))
if(HAS_TRAIT(wearer, TRAIT_UNKNOWN) || !can_examine_when_worn(viewer))
to_chat(viewer, span_notice("You can't make out that item anymore."))
return

Expand All @@ -156,6 +157,26 @@
else
viewer.examinate(src)

/// Checks if this item, when examined / pointed at while being worn, can actually be examined by the given mob
/atom/movable/proc/can_examine_when_worn(mob/examiner)
return (examiner in viewers(loc))

/obj/item/can_examine_when_worn(mob/examiner)
if(!slot_flags)
return ..()
var/mob/living/carbon/wearer = loc
if(!istype(wearer))
return ..()
if(wearer.check_obscured_slots() & slot_flags)
return FALSE
return ..()

/obj/item/clothing/accessory/can_examine_when_worn(mob/examiner)
if(isclothing(loc))
var/obj/item/clothing/shirt = loc
return shirt.can_examine_when_worn(examiner)
return ..()

/obj/item/card/id/Topic(href, list/href_list)
. = ..()
if(href_list["see_id"])
Expand Down
Loading

0 comments on commit 0d41281

Please sign in to comment.