-
Notifications
You must be signed in to change notification settings - Fork 541
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds an age field to IDs #36217
Adds an age field to IDs #36217
Conversation
@@ -334,6 +335,18 @@ | |||
modify.update_virtual_wallet() | |||
nanomanager.update_uis(src) | |||
|
|||
if ("age") | |||
if (is_authenticated()) |
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.
invert check to avoid rightward creep
if ("age") | ||
if (is_authenticated()) | ||
var/t2 = modify | ||
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) |
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.
probably better if the machine just handled sanity at the top
@@ -161,6 +161,7 @@ | |||
data["scan_name"] = scan ? scan.name : "-----" | |||
data["authenticated"] = is_authenticated() | |||
data["has_modify"] = !!modify | |||
data["age"] = modify ? modify.age_id : "-----" |
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 many dashes seems odd given that it should be 2 digits
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.
there goes the antediluvian RP
modify.age_id = trunc(abs((temp_age))) | ||
else | ||
src.visible_message("<span class='notice'>[src] buzzes rudely.</span>") | ||
modify.update_virtual_wallet() |
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.
what relationship would this have with the wallet?
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) | ||
var/temp_age = text2num(href_list["age"]) | ||
if(temp_age) | ||
modify.age_id = trunc(abs((temp_age))) |
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.
still permits very large numbers that can cause errors, like for example 999999999999999999999999999999999999999999999999999999999999999999999
just clamp it
Being extremely lazy about this but I promise to fix stuff and reply to feedback this weekend |
@Pastamadness hello are you going to work on this again? |
Yeah it's only been 2 days since I've opened this PR, rig- |
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.
As above, gonna mark this as requested changes until it's ready.
I've been hit a severe case of ennui once I lost focus on this. I'll touch this again later. |
What this does
Adds an AGE field to IDs that can be set by the HoP or when imprinting biometric data at a medical scanner (assume that a company that has mastered cloning has also mastered measuring the age of a subject).
Agent IDs can edit this field, too.
Admittedly, I have no idea what I was doing with the href list or NanoUI. Things appear work when tested but I'd appreciate some feedback on those copy-pasted parts of this PR.
Why it's good
Adds minute flavor and enables new RP interactions such as ageism or refusing to serve drinks as a bartender when your client has not reached the arbitrary legal drinking age you've chosen.
Changelog
馃啈