mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Item Plants, Grown Weapons, Botany Fixes/Changes
Botany plants can grow preset items, mobs, or fruit - Turns out that the code for mob harvestables could be used almost unchanged to support item harvestables - Changed some variable names to better reflect this Re-introduces the Egg Plant! - Grow eggs to throw at the security officer who confiscated your ambrosia! - Mutant species of Eggplants - Exactly the same as eggs laid by chickens, except they shouldn't hatch Adjusts code and logic order to avoid a conflict with TRAIT_SPREAD fruits that can be converted into other items - Grass, aloe, and comfrey were either unable to be converted or unable to be planted outside a tray if they had TRAIT_SPREAD due to logic ordering - You must now be in DISARM intent to plant spreading fruits - Being in HELP or GRAB will attempt to convert the fruit into a poultice or other item as appropriate. - If the plant does not have TRAIT_SPREAD, you may also use DISARM to accomplish this Adds Money Trees! - Literally grows money-filled fruit called Cashpods - Fruit contains gold and silver reagents, or can be turned into space cash by using it in-hand like grass or aloe - Value of the resulting space cash is related to potency. Higher potency = higher dosh! - Eating the fruit doesn't give you money, but may fill you with guilt (not really). - Mutant species of lemons. - When life gives you lemons... Adds the ability to convert sunflowers and novaflowers into their "weapon" forms - Done exactly the same as converting grass, aloe, comfrey, or cashpods (use in-hand on help/grab intent) - Sunflower conversion is silent, though the item description changes - Novaflower conversion is not silent. You'll know when it happens. - Hitting someone with a sunflower (weapon form) or novaflower (weapon form) will assault both parties with a green and yellow message. FLOWER POWER! - Hitting someone with a novaflower (weapon form) will increase their body temperature, and may cause burns as a result - Picking up a novaflower (weapon form) without gloves will cause burns, but doesn't drop the flower. COMPLETELY DELETES the code\objects\items\weapons\hydroponics.dm file - This file was 90% commented out already, and I moved the remaining code into code\modules\hydroponics\grown_inedible.dm for organization - This affects the .dme by removing a single line as the file is no longer included.
This commit is contained in:
@@ -1,240 +0,0 @@
|
||||
/* Hydroponic stuff
|
||||
* Contains:
|
||||
* Sunflowers
|
||||
* Nettle
|
||||
* Deathnettle
|
||||
* Corbcob
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* SeedBag
|
||||
*/
|
||||
//uncomment when this is updated to match storage update
|
||||
/*
|
||||
/obj/item/weapon/seedbag
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon_state = "seedbag"
|
||||
name = "Seed Bag"
|
||||
desc = "A small satchel made for organizing seeds."
|
||||
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
|
||||
var/capacity = 500; //the number of seeds it can carry.
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = 1
|
||||
var/list/item_quants = list()
|
||||
|
||||
/obj/item/weapon/seedbag/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
interact(user)
|
||||
|
||||
/obj/item/weapon/seedbag/verb/toggle_mode()
|
||||
set name = "Switch Bagging Method"
|
||||
set category = "Object"
|
||||
|
||||
mode = !mode
|
||||
switch (mode)
|
||||
if(1)
|
||||
usr << "The bag now picks up all seeds in a tile at once."
|
||||
if(0)
|
||||
usr << "The bag now picks up one seed pouch at a time."
|
||||
|
||||
/obj/item/seeds/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
..()
|
||||
if (istype(O, /obj/item/weapon/seedbag))
|
||||
var/obj/item/weapon/seedbag/S = O
|
||||
if (S.mode == 1)
|
||||
for (var/obj/item/seeds/G in locate(src.x,src.y,src.z))
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += G;
|
||||
if(S.item_quants[G.name])
|
||||
S.item_quants[G.name]++
|
||||
else
|
||||
S.item_quants[G.name] = 1
|
||||
else
|
||||
user << "\blue The seed bag is full."
|
||||
S.updateUsrDialog()
|
||||
return
|
||||
user << "\blue You pick up all the seeds."
|
||||
else
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += src;
|
||||
if(S.item_quants[name])
|
||||
S.item_quants[name]++
|
||||
else
|
||||
S.item_quants[name] = 1
|
||||
else
|
||||
user << "\blue The seed bag is full."
|
||||
S.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/item/weapon/seedbag/interact(mob/user as mob)
|
||||
|
||||
var/dat = "<TT><b>Select an item:</b><br>"
|
||||
|
||||
if (contents.len == 0)
|
||||
dat += "<font color = 'red'>No seeds loaded!</font>"
|
||||
else
|
||||
for (var/O in item_quants)
|
||||
if(item_quants[O] > 0)
|
||||
var/N = item_quants[O]
|
||||
dat += "<FONT color = 'blue'><B>[capitalize(O)]</B>:"
|
||||
dat += " [N] </font>"
|
||||
dat += "<a href='byond://?src=\ref[src];vend=[O]'>Vend</A>"
|
||||
dat += "<br>"
|
||||
|
||||
dat += "<br><a href='byond://?src=\ref[src];unload=1'>Unload All</A>"
|
||||
dat += "</TT>"
|
||||
user << browse("<HEAD><TITLE>Seedbag Supplies</TITLE></HEAD><TT>[dat]</TT>", "window=seedbag")
|
||||
onclose(user, "seedbag")
|
||||
return
|
||||
|
||||
/obj/item/weapon/seedbag/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
usr.machine = src
|
||||
if ( href_list["vend"] )
|
||||
var/N = href_list["vend"]
|
||||
|
||||
if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
|
||||
return
|
||||
|
||||
item_quants[N] -= 1
|
||||
for(var/obj/O in contents)
|
||||
if(O.name == N)
|
||||
O.loc = get_turf(src)
|
||||
usr.put_in_hands(O)
|
||||
break
|
||||
|
||||
else if ( href_list["unload"] )
|
||||
item_quants.Cut()
|
||||
for(var/obj/O in contents )
|
||||
O.loc = get_turf(src)
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/item/weapon/seedbag/updateUsrDialog()
|
||||
var/list/nearby = range(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_self(M)
|
||||
*/
|
||||
/*
|
||||
* Sunflower
|
||||
*/
|
||||
|
||||
/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>"
|
||||
|
||||
/*
|
||||
* Sun/Novaflower
|
||||
*/
|
||||
/obj/item/weapon/grown/novaflower/attack(mob/M as mob, mob/user as mob)
|
||||
M << "<font color='green'><b> [user] smacks you with a novaflower!</font><font color='yellow'><b>FLOWER POWER<b></font>"
|
||||
user << "<font color='green'> Your novaflower's </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
|
||||
|
||||
/obj/item/weapon/grown/novaflower/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if(!..()) return
|
||||
if(istype(M, /mob/living))
|
||||
M << "\red You are heated by the warmth of the of the [name]!"
|
||||
M.bodytemperature += potency/2 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
|
||||
/obj/item/weapon/grown/novaflower/pickup(mob/living/carbon/human/user as mob)
|
||||
if(!user.gloves)
|
||||
user << "\red The [name] burns your bare hand!"
|
||||
user.adjustFireLoss(rand(1,5))
|
||||
/*
|
||||
/*
|
||||
* Nettle
|
||||
*/
|
||||
/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/obj/item/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."
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grown/nettle/changePotency(newValue) //-QualityVan
|
||||
potency = newValue
|
||||
force = round((5+potency/5), 1)
|
||||
|
||||
/*
|
||||
* Deathnettle
|
||||
*/
|
||||
|
||||
/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/obj/item/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 [key_name(user)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] on [key_name(M)]</font>")
|
||||
msg_admin_attack("[key_name_admin(user)] used the [src.name] on [key_name_admin(M)]")
|
||||
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
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."
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grown/deathnettle/changePotency(newValue) //-QualityVan
|
||||
potency = newValue
|
||||
force = round((5+potency/2.5), 1)
|
||||
|
||||
|
||||
/*
|
||||
* Corncob
|
||||
*/
|
||||
/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)
|
||||
qdel(src)
|
||||
return
|
||||
*/
|
||||
Reference in New Issue
Block a user