Skip to content

Commit

Permalink
[MIRROR] Big enough carrots get a chance to be turned into full-sized…
Browse files Browse the repository at this point in the history
… carrot swords instead of shivs [MDB IGNORE] (#668)

* Big enough carrots get a chance to be turned into full-sized carrot swords instead of shivs (#79718)

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: YesterdaysPromise <[email protected]>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
Co-authored-by: carlarctg <53100513+carlarctg@ users.noreply.github.com>
  • Loading branch information
5 people authored Nov 16, 2023
1 parent efa2e60 commit bbf7517
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 3 deletions.
15 changes: 15 additions & 0 deletions code/game/objects/items/weaponry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,21 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
throw_range = 5
armour_penetration = 35

/obj/item/claymore/carrot
name = "carrot sword"
desc = "A full-sized carrot sword. Definitely \not\ good for the eyes, not anymore."
icon_state = "carrot_sword"
inhand_icon_state = "carrot_sword"
worn_icon_state = "carrot_sword"
flags_1 = NONE
force = 19
throwforce = 7
throw_speed = 3
throw_range = 7
armour_penetration = 5
block_chance = 10
resistance_flags = NONE

/obj/item/claymore/highlander //ALL COMMENTS MADE REGARDING THIS SWORD MUST BE MADE IN ALL CAPS
desc = "<b><i>THERE CAN BE ONLY ONE, AND IT WILL BE YOU!!!</i></b>\nActivate it in your hand to point to the nearest victim."
flags_1 = CONDUCT_1
Expand Down
12 changes: 9 additions & 3 deletions code/modules/hydroponics/grown/root.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@

/obj/item/food/grown/carrot/attackby(obj/item/I, mob/user, params)
if(I.get_sharpness())
to_chat(user, span_notice("You sharpen the carrot into a shiv with [I]."))
var/obj/item/knife/shiv/carrot/Shiv = new /obj/item/knife/shiv/carrot
var/carrot_blade
var/carrot_sword_chance = (max(0, seed.potency - 50) / 50)
if (prob(carrot_sword_chance))
carrot_blade = new /obj/item/claymore/carrot
to_chat(user, span_notice("You sharpen the carrot into a sword with [I]."))
else
carrot_blade = new /obj/item/knife/shiv/carrot
to_chat(user, span_notice("You sharpen the carrot into a shiv with [I]."))
remove_item_from_storage(user)
qdel(src)
user.put_in_hands(Shiv)
user.put_in_hands(carrot_blade)
else
return ..()

Expand Down
Binary file modified icons/mob/clothing/back.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/belt.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/belt_mirror.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/weapons/swords_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/weapons/swords_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/weapons/sword.dmi
Binary file not shown.

0 comments on commit bbf7517

Please sign in to comment.