mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
211 lines
6.8 KiB
Plaintext
211 lines
6.8 KiB
Plaintext
// **********************
|
|
// Other harvested materials from plants (that are not food)
|
|
// **********************
|
|
|
|
/obj/item/weapon/grown // Grown weapons
|
|
name = "grown_weapon"
|
|
icon = 'icons/obj/weapons.dmi'
|
|
var/plantname
|
|
var/potency = 1
|
|
|
|
/obj/item/weapon/grown/New()
|
|
|
|
..()
|
|
|
|
var/datum/reagents/R = new/datum/reagents(50)
|
|
reagents = R
|
|
R.my_atom = src
|
|
|
|
//Handle some post-spawn var stuff.
|
|
spawn(1)
|
|
// Fill the object up with the appropriate reagents.
|
|
if(!isnull(plantname))
|
|
var/datum/seed/S = seed_types[plantname]
|
|
if(!S || !S.chems)
|
|
return
|
|
|
|
potency = S.potency
|
|
|
|
for(var/rid in S.chems)
|
|
var/list/reagent_data = S.chems[rid]
|
|
var/rtotal = reagent_data[1]
|
|
if(reagent_data.len > 1 && potency > 0)
|
|
rtotal += round(potency/reagent_data[2])
|
|
reagents.add_reagent(rid,max(1,rtotal))
|
|
|
|
/obj/item/weapon/grown/proc/changePotency(newValue) //-QualityVan
|
|
potency = newValue
|
|
|
|
/obj/item/weapon/grown/log
|
|
name = "towercap"
|
|
name = "tower-cap log"
|
|
desc = "It's better than bad, it's good!"
|
|
icon = 'icons/obj/harvest.dmi'
|
|
icon_state = "logs"
|
|
force = 5
|
|
throwforce = 5
|
|
w_class = 3.0
|
|
throw_speed = 3
|
|
throw_range = 3
|
|
origin_tech = "materials=1"
|
|
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
|
|
|
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
|
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy))
|
|
user.show_message("<span class='notice'>You make planks out of \the [src]!</span>", 1)
|
|
for(var/i=0,i<2,i++)
|
|
var/obj/item/stack/sheet/wood/NG = new (user.loc)
|
|
for (var/obj/item/stack/sheet/wood/G in user.loc)
|
|
if(G==NG)
|
|
continue
|
|
if(G.amount>=G.max_amount)
|
|
continue
|
|
G.attackby(NG, user, params)
|
|
usr << "You add the newly-formed wood to the stack. It now contains [NG.amount] planks."
|
|
del(src)
|
|
return
|
|
|
|
/obj/item/weapon/grown/sunflower // FLOWER POWER!
|
|
plantname = "sunflowers"
|
|
name = "sunflower"
|
|
desc = "It's beautiful! A certain person might beat you to death if you trample these."
|
|
icon = 'icons/obj/harvest.dmi'
|
|
icon_state = "sunflower"
|
|
damtype = "fire"
|
|
force = 0
|
|
throwforce = 1
|
|
w_class = 1.0
|
|
throw_speed = 1
|
|
throw_range = 3
|
|
|
|
/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob)
|
|
M << "<font color='green'><b> [user] smacks you with a sunflower!</font><font color='yellow'><b>FLOWER POWER<b></font>"
|
|
user << "<font color='green'> Your sunflower's </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
|
|
|
|
/obj/item/weapon/grown/nettle // -- Skie
|
|
plantname = "nettle"
|
|
desc = "It's probably <B>not</B> wise to touch it with bare hands..."
|
|
icon = 'icons/obj/weapons.dmi'
|
|
name = "nettle"
|
|
icon_state = "nettle"
|
|
damtype = "fire"
|
|
force = 15
|
|
throwforce = 1
|
|
w_class = 2.0
|
|
throw_speed = 1
|
|
throw_range = 3
|
|
origin_tech = "combat=1"
|
|
New()
|
|
..()
|
|
spawn(5)
|
|
force = round((5+potency/5), 1)
|
|
|
|
/obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob)
|
|
if(!user.gloves)
|
|
user << "\red The nettle burns your bare hand!"
|
|
if(istype(user, /mob/living/carbon/human))
|
|
var/organ = ((user.hand ? "l_":"r_") + "arm")
|
|
var/datum/organ/external/affecting = user.get_organ(organ)
|
|
if(affecting.take_damage(0,force))
|
|
user.UpdateDamageIcon()
|
|
else
|
|
user.take_organ_damage(0,force)
|
|
|
|
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
|
|
if(!proximity) return
|
|
if(force > 0)
|
|
force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
|
|
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
|
else
|
|
usr << "All the leaves have fallen off the nettle from violent whacking."
|
|
del(src)
|
|
|
|
/obj/item/weapon/grown/nettle/changePotency(newValue) //-QualityVan
|
|
potency = newValue
|
|
force = round((5+potency/5), 1)
|
|
|
|
/obj/item/weapon/grown/deathnettle // -- Skie
|
|
plantname = "deathnettle"
|
|
desc = "The \red glowing \black nettle incites \red<B>rage</B>\black in you just from looking at it!"
|
|
icon = 'icons/obj/weapons.dmi'
|
|
name = "deathnettle"
|
|
icon_state = "deathnettle"
|
|
damtype = "fire"
|
|
force = 30
|
|
throwforce = 1
|
|
w_class = 2.0
|
|
throw_speed = 1
|
|
throw_range = 3
|
|
origin_tech = "combat=3"
|
|
attack_verb = list("stung")
|
|
New()
|
|
..()
|
|
spawn(5)
|
|
force = round((5+potency/2.5), 1)
|
|
|
|
suicide_act(mob/user)
|
|
viewers(user) << "\red <b>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</b>"
|
|
return (BRUTELOSS|TOXLOSS)
|
|
|
|
/obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob)
|
|
if(!user.gloves)
|
|
if(istype(user, /mob/living/carbon/human))
|
|
var/organ = ((user.hand ? "l_":"r_") + "arm")
|
|
var/datum/organ/external/affecting = user.get_organ(organ)
|
|
if(affecting.take_damage(0,force))
|
|
user.UpdateDamageIcon()
|
|
else
|
|
user.take_organ_damage(0,force)
|
|
if(prob(50))
|
|
user.Paralyse(5)
|
|
user << "\red You are stunned by the Deathnettle when you try picking it up!"
|
|
|
|
/obj/item/weapon/grown/deathnettle/attack(mob/living/carbon/M as mob, mob/user as mob)
|
|
if(!..()) return
|
|
if(istype(M, /mob/living))
|
|
M << "\red You are stunned by the powerful acid of the Deathnettle!"
|
|
|
|
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had the [src.name] used on them by [user.name] ([user.ckey])</font>")
|
|
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] on [M.name] ([M.ckey])</font>")
|
|
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] on [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
|
|
|
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
|
|
|
M.eye_blurry += force/7
|
|
if(prob(20))
|
|
M.Paralyse(force/6)
|
|
M.Weaken(force/15)
|
|
M.drop_item()
|
|
|
|
/obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
|
|
if(!proximity) return
|
|
if (force > 0)
|
|
force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
|
|
|
|
else
|
|
usr << "All the leaves have fallen off the deathnettle from violent whacking."
|
|
del(src)
|
|
|
|
/obj/item/weapon/grown/deathnettle/changePotency(newValue) //-QualityVan
|
|
potency = newValue
|
|
force = round((5+potency/2.5), 1)
|
|
|
|
/obj/item/weapon/corncob
|
|
name = "corn cob"
|
|
desc = "A reminder of meals gone by."
|
|
icon = 'icons/obj/harvest.dmi'
|
|
icon_state = "corncob"
|
|
item_state = "corncob"
|
|
w_class = 2.0
|
|
throwforce = 0
|
|
throw_speed = 4
|
|
throw_range = 20
|
|
|
|
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
|
..()
|
|
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual))
|
|
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
|
|
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
|
|
del(src)
|
|
return
|