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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds an age field to IDs #36217

Closed

Conversation

Pastamadness
Copy link
Contributor

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

馃啈

  • rscadd: IDs now contain an age field.

@@ -334,6 +335,18 @@
modify.update_virtual_wallet()
nanomanager.update_uis(src)

if ("age")
if (is_authenticated())
Copy link
Collaborator

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)))
Copy link
Collaborator

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 : "-----"
Copy link
Collaborator

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

Copy link
Collaborator

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()
Copy link
Collaborator

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)))
Copy link
Collaborator

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

@jwhitak jwhitak added the Content Adds something. Neat! label Mar 17, 2024
@Pastamadness
Copy link
Contributor Author

Being extremely lazy about this but I promise to fix stuff and reply to feedback this weekend

@west3436
Copy link
Collaborator

@Pastamadness hello are you going to work on this again?

@Pastamadness
Copy link
Contributor Author

@Pastamadness hello are you going to work on this again?

Yeah it's only been 2 days since I've opened this PR, rig-

Copy link
Collaborator

@jwhitak jwhitak left a 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.

@Pastamadness
Copy link
Contributor Author

I've been hit a severe case of ennui once I lost focus on this. I'll touch this again later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content Adds something. Neat!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants