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

Simple knife repath, removes a layer of unecessary nesting #9949

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

Tsar-Salat
Copy link
Contributor

@Tsar-Salat Tsar-Salat commented Oct 3, 2023

Ports:

About The Pull Request

Repaths all knives from obj/item/kitchen/knife to obj/item/knife, genericized knife behavior is now stored on the parent knife, which shouldnt be spawned in and only be used in checks. Children knives are written like obj/item/knife/rainbow or obj/item/knife/combat

There should be no ingame changes, other than I replaced a single Soviet kit to use a combat knife instead of a kitchen knife.

Why It's Good For The Game

Kitchen knives were the first implemented knives in the game many years ago, and so thus all knives derive from it and use its path as a parent. This works fine, but it can be somewhat confusing in coding or trying to debug why heretic blades or rainbow knives are considered a 'kitchen' tool.

Testing Photographs and Procedure

Screenshots&Videos

All typical knife behavior

dreamseeker_81dZQEhkFp.mp4

Changelog

🆑 rkz, itseasytosee
code: repathed knives, removing unecessary nesting
/:cl:

Copy link
Member

@PowerfulBacon PowerfulBacon left a comment

Choose a reason for hiding this comment

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

Update the UpdatePaths/scripts to include the repathed items so that in the case of merge conflicts, we can just run the script and resolve them

@PowerfulBacon
Copy link
Member

image

@@ -0,0 +1,2 @@
/obj/item/knife/ : /obj/item/kitchen/knife/{@OLD}
Copy link
Member

Choose a reason for hiding this comment

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

Should this have the / at the end?

Copy link
Contributor Author

@Tsar-Salat Tsar-Salat Oct 5, 2023

Choose a reason for hiding this comment

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

Yes. Those are every knife besides kitchen knives.

/obj/item/kitchen/knife is a kitchen knife. Before it was the parent of all knives, but now it is a derivative of /obj/item/knife. This differentiation is important so regular kitchen knives are converted

In the unlikely event a merge conflict occurs, I will fix it within the hour.

@PowerfulBacon PowerfulBacon added this pull request to the merge queue Oct 5, 2023
Merged via the queue into BeeStation:master with commit d073839 Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants