Skip to content

Commit

Permalink
Merge pull request #3526 from MistakeNot4892/ailments
Browse files Browse the repository at this point in the history
Allows faults to be treated with duct tape.
  • Loading branch information
out-of-phaze authored Dec 13, 2023
2 parents 5ce968c + 3392708 commit 2ae0714
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion code/modules/organs/ailments/_ailment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@
return

/datum/ailment/proc/treated_by_item(var/obj/item/treatment)
return treated_by_item_type && istype(treatment, treated_by_item_type)
if(islist(treated_by_item_type))
for(var/treatment_type in treated_by_item_type)
if(istype(treatment, treatment_type))
return TRUE
else if(ispath(treated_by_item_type))
return istype(treatment, treated_by_item_type)
return FALSE

/datum/ailment/proc/replace_tokens(var/message, var/obj/item/treatment, var/mob/user, var/mob/target)
. = message
Expand Down
5 changes: 4 additions & 1 deletion code/modules/organs/ailments/faults/_fault.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/datum/ailment/fault
affects_robotics = TRUE
category = /datum/ailment/fault
treated_by_item_type = /obj/item/stack/nanopaste
treated_by_item_type = list(
/obj/item/stack/nanopaste,
/obj/item/stack/tape_roll/duct_tape
)
treated_by_item_cost = 3
third_person_treatment_message = "$USER$ patches $TARGET$'s faulty $ORGAN$ with $ITEM$."
self_treatment_message = "$USER$ patches $USER_HIS$ faulty $ORGAN$ with $ITEM$."
Expand Down

0 comments on commit 2ae0714

Please sign in to comment.