Skip to content

Commit

Permalink
katana coating checks if human + minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinfromHP committed Oct 18, 2023
1 parent c9779b4 commit 279826c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
11 changes: 11 additions & 0 deletions code/__secret_public.dme
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@
#ifndef CONFIG_PATH_PREFIX
#define CONFIG_PATH_PREFIX ""
#endif
// BEGIN_INTERNALS
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
// END_FILE_DIR
// BEGIN_PREFERENCES
// END_PREFERENCES
// BEGIN_INCLUDE
#include "_placeholder.dm"
#include "_publicVersion.dm"
// END_INCLUDE
9 changes: 4 additions & 5 deletions code/obj/item/misc_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1278,16 +1278,15 @@ TYPEINFO(/obj/item/swords/katana)
apply_coating(target, user)

proc/apply_coating(var/atom/target, var/mob/user)
if (target.is_open_container())
var/obj/item/reagent_containers/RC = target
if(RC.reagents.has_reagent("sakuride", 1))
if(length(RC.reagents.reagent_list) > 1)
if (target.is_open_container() && !istype(target, /mob))
if(target.reagents.has_reagent("sakuride", 1))
if(length(target.reagents.reagent_list) > 1)
boutput(user, "<span class='alert'>This coating is impure!</span>")
return
if(src.reagents.has_reagent("sakuride", src.reagent_capacity))
boutput(user, "<span class='alert'>The blade is already coated!</span>")
return
RC.reagents.trans_to(src, src.reagent_capacity)
target.reagents.trans_to(src, src.reagent_capacity)
boutput(user, "You apply the coating to the blade.")
else
boutput(user, "<span class='alert'>You cannot coat the [src] in this!</span>")
Expand Down

0 comments on commit 279826c

Please sign in to comment.