-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spades and such no longer damage Craig (or planter trays) if you or t…
…hem move (#3882)
- Loading branch information
Showing
1 changed file
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
/obj/item/shovel/spade/pre_attack(atom/A, mob/living/user, params) | ||
if(user.istate & ISTATE_HARM) | ||
return ..() | ||
if(A.GetComponent(/datum/component/plant_growing)) | ||
if(!do_after(user, 3 SECONDS, A)) | ||
return ..() | ||
SEND_SIGNAL(A, COMSIG_PLANTER_REMOVE_PLANTS) | ||
if(do_after(user, 3 SECONDS, A)) | ||
SEND_SIGNAL(A, COMSIG_PLANTER_REMOVE_PLANTS) | ||
return TRUE | ||
. = ..() | ||
return ..() | ||
|
||
/obj/item/cultivator/pre_attack(atom/A, mob/living/user, params) | ||
if(user.istate & ISTATE_HARM) | ||
return ..() | ||
if(SEND_SIGNAL(A, COMSIG_GROWING_ADJUST_WEED, -10)) | ||
user.visible_message(span_notice("[user] uproots the weeds."), span_notice("You remove the weeds from [src].")) | ||
return TRUE | ||
. = ..() | ||
return ..() | ||
|
||
/obj/item/secateurs/pre_attack(atom/A, mob/living/user, params) | ||
if(user.istate & ISTATE_HARM) | ||
return ..() | ||
if(SEND_SIGNAL(A, COMSIG_GROWING_TRY_SECATEUR, user)) | ||
return TRUE | ||
. = ..() | ||
return ..() | ||
|
||
/obj/item/graft/pre_attack(atom/A, mob/living/user, params) | ||
if(SEND_SIGNAL(A, COMSIG_GROWER_TRY_GRAFT, user, src)) | ||
return TRUE | ||
. = ..() | ||
return ..() |