-
Notifications
You must be signed in to change notification settings - Fork 223
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
Move identity and name procs up to mob-level #3336
Move identity and name procs up to mob-level #3336
Conversation
code/modules/mob/mob.dm
Outdated
var/obj/item/card/id/id = GetIdCard() | ||
if(istype(id)) | ||
return id.rank ? id.rank : if_no_job | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extraneous else
that you seem to have trimmed off the other procs.
code/modules/mob/mob.dm
Outdated
return FALSE | ||
var/obj/item/clothing/mask/mask = get_equipped_item(slot_wear_mask_str) | ||
var/obj/item/head = get_equipped_item(slot_head_str) | ||
if(mask?.flags_inv & HIDEFACE || head?.flags_inv & HIDEFACE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(mask?.flags_inv & HIDEFACE)
and (head?.flags_inv & HIDEFACE)
code/modules/mob/mob.dm
Outdated
if(mask?.flags_inv & HIDEFACE || head?.flags_inv & HIDEFACE) | ||
return FALSE | ||
var/decl/bodytype/our_bodytype = get_bodytype() | ||
if(our_bodytype?.has_limbs[BP_HEAD]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we need a should_have_limb()
. Noting as a side comment that should_have_organ()
needs to be moved to /mob/living too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paren addition only, other code looks fine.
244485d
to
f62822f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than the conflict and CI stall.
f62822f
to
9f651c8
Compare
9f651c8
to
3a59897
Compare
code/modules/mob/examine.dm
Outdated
@@ -40,11 +40,14 @@ | |||
/mob/proc/show_other_examine_strings(mob/user, distance, infix, suffix, hideflags, decl/pronouns/pronouns) | |||
return | |||
|
|||
/mob/examine(mob/user, distance, infix, suffix) | |||
/mob/examine(mob/living/user, distance, infix, suffix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the proc signature at odds with everywhere else, and ghosts will be unable to examine anyone now. Really should just gate the tail check imo.
3a59897
to
6e793af
Compare
Description of changes
Adds
exceptions
keyword argument to all overrides ofGetIdCards()
on/mob
.Adds return type annotation to
/mob/GetIdCard()
.Moves various identity-related procs up to mob-level and generalizes/cleans up the associated logic.
Removes a redundant helper proc,
/proc/FindNameFromID()
, that was only used in one spot. Replaces it with the almost identical proc/mob/proc/get_id_name()
.Why and what will this PR improve
Cleanup and generalization of some pretty old code. Removes humantype/carbontype bias in code which should allow for carbon removal and non-humantype playable mobs in the future.