Skip to content

Commit

Permalink
Fixes humans being unable to upgrade borgs (#5191)
Browse files Browse the repository at this point in the history
* borg human tool upgrade fix

* removes debug logging
  • Loading branch information
Trilbyspaceclone authored Apr 21, 2024
1 parent 71b2f56 commit 338ebae
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions code/game/objects/items/weapons/tools/mods/_upgrades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
return can_apply(A, user) && apply(A, user)

/datum/component/item_upgrade/proc/can_apply(var/atom/A, var/mob/living/user)

if(isrobot(A))
return check_robot(A, user)

Expand Down Expand Up @@ -89,11 +88,15 @@
var/list/robotools = list()
for(var/obj/item/tool/robotool in R.module.modules)
robotools.Add(robotool)
for(var/obj/item/gun/robogun in R.module.modules)
robotools.Add(robogun)
if(robotools.len)
var/obj/item/tool/chosen_tool = input(user,"Which tool are you trying to modify?","Tool Modification","Cancel") in robotools + "Cancel"
if(chosen_tool == "Cancel")
var/obj/item/tool/chosen_tool = input(user,"Which tool are you trying to modify?","Tool Modification","Cancel") as null|anything in robotools + "Cancel"
if(!chosen_tool == "Cancel")
return FALSE
return can_apply(chosen_tool,user)
if(can_apply(chosen_tool,user))
apply(chosen_tool, user)
return FALSE
if(user)
to_chat(user, SPAN_WARNING("[R] has no modifiable tools."))
return FALSE
Expand Down

0 comments on commit 338ebae

Please sign in to comment.