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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doormats, modify liquid presentation #4796

Merged
merged 3 commits into from
Feb 1, 2025

Conversation

out-of-phaze
Copy link
Member

@out-of-phaze out-of-phaze commented Jan 23, 2025

Description of changes

This is kind of a doozy, I wasn't great with modularising, planning to split it out if needed.

  • Adds doormats, a variety of towel intended for stepping on.
  • Makes towels receive reagents from contaminants when you step over them, with the amount increasing if you move deliberately ('creeping' move intent), and decreasing if you move quickly ('running' move intent).
  • Lowers the minimum reagents removed from a towel per tick so that them actually getting saturated is more of a concern. Wring them out, dangit! (I'm not actually sure if that's implemented currently... it may just be rags.)
  • Rewrites on-examine text to be more flexible wrt overrides and such, in preparation for the other changes:
  • Adds procedural coating and liquid names, inspired by Caves of Qud.
    • Pure water can optionally be referred to as 'fresh water', pending moving this into a modpack so it can be disabled for space stuff? Unless it's desired there, too, IDK
    • Water with salt in it will be referred to as saltwater.
    • There is a config option for Qud-style coloration (each component of the liquid name is colored according to that component's color), SS13-style coloration (use the color of the reagent mixture), and no coloration at all.

Depends on #4798 to fix CI errors. Done.

Why and what will this PR improve

Adds a way to stop people from tracking stains indoors on certain (planetary) maps, which isn't foolproof and requires occasional interaction. I might even nerf the passive drying a lot or even remove it entirely, to give you a reason to pick it up and wash it or wring it out outside.

Makes coating and fluid presentation a lot more visually interesting and informative. I might try palletizing the colors in the future (based on client light/dark mode setting) to make sure they're readable, but for now this works well enough.

Authorship

Me, and the Caves of Qud developers for the inspiration for the coating/liquid name system. Also thanks to suno-lili-so and librarianmage in the Caves of Qud discord for explaining the technical side of the liquids system in CoQ more in-depth, and to the Caves of Qud wiki maintainers (which I believe includes those two as well as others) for documenting liquid adjectives for me to steal.

Changelog

🆑
add: Added doormats.
tweak: Modified liquid and coating presentation to be more fancy.
/:cl:

@out-of-phaze out-of-phaze added the work in progress This PR is under development and shouldn't be merged. label Jan 23, 2025
@out-of-phaze out-of-phaze added has dependencies This PR should not be merged prior to any PRs linked in body or comments. and removed has dependencies This PR should not be merged prior to any PRs linked in body or comments. labels Jan 24, 2025
@out-of-phaze out-of-phaze added ready for review This PR is ready for review and merge. and removed work in progress This PR is under development and shouldn't be merged. labels Jan 29, 2025
@out-of-phaze out-of-phaze marked this pull request as ready for review January 29, 2025 20:06
@MistakeNot4892 MistakeNot4892 added has conflicts This PR needs updating and conflict resolution before it can be merged. and removed ready for review This PR is ready for review and merge. labels Jan 30, 2025
- `infix`: TODO
- `suffix`: TODO
- `infix`: An optional string appended directly to the 'That's an X' string, between the name the end of the sentence.
- `suffix`: An optional string appended in a separate sentence after the initial introduction line.
- Return: `TRUE` when the call chain is valid, otherwise `FALSE`
- Events: `atom_examined`
*/
/atom/proc/examine(mob/user, distance, infix = "", suffix = "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self to get around to splitting base examine() up like mob examine() and make it combine a set of lines instead of farting it straight out at user.

/obj/item/towel/can_be_poured_into(atom/source)
return (reagents?.maximum_volume > 0)

/obj/item/towel/proc/update_material_description()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really need an item-level update_descrption() to go with update_name(). Maybe even /obj level so the structure procs can share behavior or override.

// would this have any use aside from fluff strings? sandpaper grit maybe?
desc = "A [is_soft ? "soft" : "rugged"] [material.adjective_name] [base_name][additional_description ? " [additional_description]" : null]." // 'a soft cotton towel' by default. also supports 'a rugged leather doormat used to blah blah' etc

/obj/item/towel/examine(mob/user, distance, infix, suffix)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonder if we could use the drying system for towel wetness instead of the general evaporation thing it does currently? Have it dry out without ever creating a dried product, would let you put towels near a fire to dry.

/// Gets the name used to describe a coating with this material as its primary reagent.
/// This is mostly for handling special cases like mud.
/decl/material/proc/get_primary_coating_name(datum/reagents/coating)
var/phase_at_stp = phase_at_temperature()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason to cast this versus just passing the function call as a parameter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment after was added when i ripped out a bunch of more nuanced handling that didn't really work

var/used_color = get_reagent_color(coating)
if(get_config_value(/decl/config/enum/colored_coating_names) == CONFIG_COATING_COLOR_COMPONENTS)
return FONT_COLORED(used_color, coated_adjective)
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: extraneous else.

@out-of-phaze out-of-phaze added ready for review This PR is ready for review and merge. and removed has conflicts This PR needs updating and conflict resolution before it can be merged. labels Jan 30, 2025
MistakeNot4892
MistakeNot4892 previously approved these changes Jan 30, 2025
@MistakeNot4892 MistakeNot4892 added the has conflicts This PR needs updating and conflict resolution before it can be merged. label Jan 30, 2025
@MistakeNot4892 MistakeNot4892 removed the has conflicts This PR needs updating and conflict resolution before it can be merged. label Feb 1, 2025
@MistakeNot4892 MistakeNot4892 merged commit 0775a3a into NebulaSS13:dev Feb 1, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR is ready for review and merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants