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

Tactical Prybar Works For Substitute Surgical #5955

Closed
wants to merge 3 commits into from
Closed

Tactical Prybar Works For Substitute Surgical #5955

wants to merge 3 commits into from

Conversation

Katskan
Copy link
Contributor

@Katskan Katskan commented Mar 15, 2024

About the pull request

Adds the tactical prybar at the same level as a crowbar for improvised surgeries. Previously it wasn't included in the list probably due to an oversight.

Explain why it's good for the game

It's bad to have types of the same tool that can't do the same thing as each other, it leads to a lot of confusion and can be frustrating.

Testing Photographs and Procedure

Tested out on a local server, worked great

Changelog

🆑
fix: Added the tactical prybar to the surgical tools list as a substitute tier tool, similar to the crowbar it's derived from
/:cl:

@github-actions github-actions bot added the Fix Fix one bug, make ten more label Mar 15, 2024
Copy link
Member

@SabreML SabreML left a comment

Choose a reason for hiding this comment

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

Unless I'm misunderstanding the intent of the PR, the tactical crowbar already works the same as a regular one for surgery, so this isn't actually changing anything:
image
image


Whether or not a tool can be used for surgery is decided by /datum/surgery_step/proc/tool_check(), which checks if the tool's type is in the tools_cache list:

/datum/surgery_step/proc/tool_check(mob/user, obj/item/tool, datum/surgery/surgery)
if(!tool)
if(accept_hand)
return TRUE ///obj/limb/hand ?
else
if(accept_any_item)
return TRUE
else
return tools_cache[tool.type]
return FALSE

tools_cache is generated in /datum/surgery_step/New(), where it loops through each entry in the tools list (in this case SURGERY_TOOLS_PRY_ENCASED) and adds both the item and any subtypes to the cache:
/datum/surgery_step/New()
. = ..()
for(var/tool_path in tools)
var/list/templist = typesof(tool_path)
for(var/iteration in templist)
tools_cache[iteration] = tool_path

Because of this, /obj/item/tool/crowbar/tactical has the same behaviour as /obj/item/tool/crowbar.

@Katskan
Copy link
Contributor Author

Katskan commented Mar 16, 2024

Ok, I took it at face value that it had been reported to me as not working for surgery. May have been something else going on, will re-open if it becomes an issue in the future.

@Katskan Katskan closed this Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Fix one bug, make ten more
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants