mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +01:00
Hydroponics refactor, part 1: Files.
No code actually modified, just moved from all over the place to a module folder. defines/obj/hydro.dm split: -Seeds into seeds.dm -Tools like the analyzer, pest and weedkillers into hydro_tools.dm. Hatches and scythe from defines/obj/weapon.dm moved there too. -Non-edible plants like nettles into grown_inedible.dm. Special procs in items/weapons/hydroponics.dm moved there. -Biogenerator and hydroponics tray files moved.
This commit is contained in:
+5
-4
@@ -158,7 +158,6 @@
|
||||
#include "code\datums\spells\turf_teleport.dm"
|
||||
#include "code\datums\spells\wizard.dm"
|
||||
#include "code\defines\obj.dm"
|
||||
#include "code\defines\obj\hydro.dm"
|
||||
#include "code\defines\obj\weapon.dm"
|
||||
#include "code\defines\procs\AStar.dm"
|
||||
#include "code\defines\procs\captain_announce.dm"
|
||||
@@ -281,7 +280,6 @@
|
||||
#include "code\game\machinery\Beacon.dm"
|
||||
#include "code\game\machinery\bees_apiary.dm"
|
||||
#include "code\game\machinery\bees_items.dm"
|
||||
#include "code\game\machinery\biogenerator.dm"
|
||||
#include "code\game\machinery\buttons.dm"
|
||||
#include "code\game\machinery\cell_charger.dm"
|
||||
#include "code\game\machinery\cloning.dm"
|
||||
@@ -296,7 +294,6 @@
|
||||
#include "code\game\machinery\Freezer.dm"
|
||||
#include "code\game\machinery\hologram.dm"
|
||||
#include "code\game\machinery\holosign.dm"
|
||||
#include "code\game\machinery\hydroponics.dm"
|
||||
#include "code\game\machinery\igniter.dm"
|
||||
#include "code\game\machinery\iv_drip.dm"
|
||||
#include "code\game\machinery\lightswitch.dm"
|
||||
@@ -534,7 +531,6 @@
|
||||
#include "code\game\objects\items\weapons\flamethrower.dm"
|
||||
#include "code\game\objects\items\weapons\gift_wrappaper.dm"
|
||||
#include "code\game\objects\items\weapons\handcuffs.dm"
|
||||
#include "code\game\objects\items\weapons\hydroponics.dm"
|
||||
#include "code\game\objects\items\weapons\kitchen.dm"
|
||||
#include "code\game\objects\items\weapons\manuals.dm"
|
||||
#include "code\game\objects\items\weapons\mop.dm"
|
||||
@@ -847,6 +843,11 @@
|
||||
#include "code\modules\food\recipes_microwave.dm"
|
||||
#include "code\modules\games\cards.dm"
|
||||
#include "code\modules\genetics\side_effects.dm"
|
||||
#include "code\modules\hydroponics\biogenerator.dm"
|
||||
#include "code\modules\hydroponics\grown_inedible.dm"
|
||||
#include "code\modules\hydroponics\hydro_tools.dm"
|
||||
#include "code\modules\hydroponics\hydro_tray.dm"
|
||||
#include "code\modules\hydroponics\seeds.dm"
|
||||
#include "code\modules\library\lib_items.dm"
|
||||
#include "code\modules\library\lib_machines.dm"
|
||||
#include "code\modules\library\lib_readme.dm"
|
||||
|
||||
@@ -36,17 +36,6 @@
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
/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/soap
|
||||
name = "soap"
|
||||
desc = "A cheap bar of soap. Doesn't smell."
|
||||
@@ -464,54 +453,6 @@
|
||||
w_class = 2.0
|
||||
origin_tech = "biotech=2"
|
||||
|
||||
/obj/item/weapon/hatchet
|
||||
name = "hatchet"
|
||||
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "hatchet"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
force = 12.0
|
||||
w_class = 2.0
|
||||
throwforce = 15.0
|
||||
throw_speed = 4
|
||||
throw_range = 4
|
||||
m_amt = 15000
|
||||
origin_tech = "materials=2;combat=1"
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/hatchet/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/hatchet/unathiknife
|
||||
name = "duelling knife"
|
||||
desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "unathiknife"
|
||||
attack_verb = list("ripped", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/scythe
|
||||
icon_state = "scythe0"
|
||||
name = "scythe"
|
||||
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
|
||||
force = 13.0
|
||||
throwforce = 5.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
w_class = 4.0
|
||||
flags = FPRINT | TABLEPASS | NOSHIELD
|
||||
slot_flags = SLOT_BACK
|
||||
origin_tech = "materials=2;combat=2"
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
|
||||
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(A, /obj/effect/spacevine))
|
||||
for(var/obj/effect/spacevine/B in orange(A,1))
|
||||
if(prob(80))
|
||||
del B
|
||||
del A
|
||||
|
||||
/*
|
||||
/obj/item/weapon/cigarpacket
|
||||
name = "Pete's Cuban Cigars"
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
/* Hydroponic stuff
|
||||
* Contains:
|
||||
* Sunflowers
|
||||
* Nettle
|
||||
* Deathnettle
|
||||
* Corbcob
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* SeedBag
|
||||
*/
|
||||
@@ -122,97 +112,3 @@
|
||||
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>"
|
||||
|
||||
|
||||
/*
|
||||
* 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/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)
|
||||
|
||||
/*
|
||||
* 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/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)
|
||||
|
||||
|
||||
/*
|
||||
* Corncob
|
||||
*/
|
||||
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
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
|
||||
|
||||
@@ -1,226 +1,226 @@
|
||||
/obj/machinery/biogenerator
|
||||
name = "Biogenerator"
|
||||
desc = ""
|
||||
icon = 'icons/obj/biogenerator.dmi'
|
||||
icon_state = "biogen-stand"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 40
|
||||
var/processing = 0
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/points = 0
|
||||
var/menustat = "menu"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
|
||||
|
||||
on_reagent_change() //When the reagents change, change the icon as well.
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
if(!src.beaker)
|
||||
icon_state = "biogen-empty"
|
||||
else if(!src.processing)
|
||||
icon_state = "biogen-stand"
|
||||
else
|
||||
icon_state = "biogen-work"
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
if(beaker)
|
||||
user << "\red The biogenerator is already loaded."
|
||||
else
|
||||
user.before_take_item(O)
|
||||
O.loc = src
|
||||
beaker = O
|
||||
updateUsrDialog()
|
||||
else if(processing)
|
||||
user << "\red The biogenerator is currently processing."
|
||||
else if(istype(O, /obj/item/weapon/storage/bag/plants))
|
||||
var/i = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
||||
i++
|
||||
if(i >= 10)
|
||||
user << "\red The biogenerator is already full! Activate it."
|
||||
else
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
||||
G.loc = src
|
||||
i++
|
||||
if(i >= 10)
|
||||
user << "\blue You fill the biogenerator to its capacity."
|
||||
break
|
||||
if(i<10)
|
||||
user << "\blue You empty the plant bag into the biogenerator."
|
||||
|
||||
|
||||
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
user << "\red You cannot put this in [src.name]"
|
||||
else
|
||||
var/i = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
||||
i++
|
||||
if(i >= 10)
|
||||
user << "\red The biogenerator is full! Activate it."
|
||||
else
|
||||
user.before_take_item(O)
|
||||
O.loc = src
|
||||
user << "\blue You put [O.name] in [src.name]"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/interact(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<TITLE>Biogenerator</TITLE>Biogenerator:<BR>"
|
||||
if (processing)
|
||||
dat += "<FONT COLOR=red>Biogenerator is processing! Please wait...</FONT>"
|
||||
else
|
||||
dat += "Biomass: [points] points.<HR>"
|
||||
switch(menustat)
|
||||
if("menu")
|
||||
if (beaker)
|
||||
dat += "<A href='?src=\ref[src];action=activate'>Activate Biogenerator!</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=detach'>Detach Container</A><BR><BR>"
|
||||
dat += "Food<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=milk;cost=20'>10 milk</A> <FONT COLOR=blue>(20)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=meat;cost=50'>Slab of meat</A> <FONT COLOR=blue>(50)</FONT><BR>"
|
||||
dat += "Nutrient<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>(10)</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=50'>x5</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>(20)</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=100'>x5</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>(25)</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=125'>x5</A><BR>"
|
||||
dat += "Leather<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=wallet;cost=100'>Wallet</A> <FONT COLOR=blue>(100)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=gloves;cost=250'>Botanical gloves</A> <FONT COLOR=blue>(250)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=tbelt;cost=300'>Utility belt</A> <FONT COLOR=blue>(300)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=satchel;cost=400'>Leather Satchel</A> <FONT COLOR=blue>(400)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=cashbag;cost=400'>Cash Bag</A> <FONT COLOR=blue>(400)</FONT><BR>"
|
||||
//dat += "Other<BR>"
|
||||
//dat += "<A href='?src=\ref[src];action=create;item=monkey;cost=500'>Monkey</A> <FONT COLOR=blue>(500)</FONT><BR>"
|
||||
else
|
||||
dat += "<BR><FONT COLOR=red>No beaker inside. Please insert a beaker.</FONT><BR>"
|
||||
if("nopoints")
|
||||
dat += "You do not have biomass to create products.<BR>Please, put growns into reactor and activate it.<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
|
||||
if("complete")
|
||||
dat += "Operation complete.<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
|
||||
if("void")
|
||||
dat += "<FONT COLOR=red>Error: No growns inside.</FONT><BR>Please, put growns into reactor.<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
|
||||
user << browse(dat, "window=biogenerator")
|
||||
onclose(user, "biogenerator")
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/attack_hand(mob/user as mob)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/biogenerator/proc/activate()
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
if (src.stat != 0) //NOPOWER etc
|
||||
return
|
||||
if(src.processing)
|
||||
usr << "\red The biogenerator is in the process of working."
|
||||
return
|
||||
var/S = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents)
|
||||
S += 5
|
||||
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
|
||||
points += 1
|
||||
else points += I.reagents.get_reagent_amount("nutriment")*10
|
||||
del(I)
|
||||
if(S)
|
||||
processing = 1
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
|
||||
use_power(S*30)
|
||||
sleep(S+15)
|
||||
processing = 0
|
||||
update_icon()
|
||||
else
|
||||
menustat = "void"
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/proc/create_product(var/item,var/cost)
|
||||
if(cost > points)
|
||||
menustat = "nopoints"
|
||||
return 0
|
||||
processing = 1
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
points -= cost
|
||||
sleep(30)
|
||||
switch(item)
|
||||
if("milk")
|
||||
beaker.reagents.add_reagent("milk",10)
|
||||
if("meat")
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/meat(src.loc)
|
||||
if("ez")
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
if("l4z")
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
if("rh")
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
if("l4z5")
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
if("rh5")
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
if("wallet")
|
||||
new/obj/item/weapon/storage/wallet(src.loc)
|
||||
if("gloves")
|
||||
new/obj/item/clothing/gloves/botanic_leather(src.loc)
|
||||
if("tbelt")
|
||||
new/obj/item/weapon/storage/belt/utility(src.loc)
|
||||
if("satchel")
|
||||
new/obj/item/weapon/storage/backpack/satchel(src.loc)
|
||||
if("cashbag")
|
||||
new/obj/item/weapon/storage/bag/cash(src.loc)
|
||||
if("monkey")
|
||||
new/mob/living/carbon/monkey(src.loc)
|
||||
processing = 0
|
||||
menustat = "complete"
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/machinery/biogenerator/Topic(href, href_list)
|
||||
if(stat & BROKEN) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
usr.set_machine(src)
|
||||
|
||||
switch(href_list["action"])
|
||||
if("activate")
|
||||
activate()
|
||||
if("detach")
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker = null
|
||||
update_icon()
|
||||
if("create")
|
||||
create_product(href_list["item"],text2num(href_list["cost"]))
|
||||
if("menu")
|
||||
menustat = "menu"
|
||||
updateUsrDialog()
|
||||
/obj/machinery/biogenerator
|
||||
name = "Biogenerator"
|
||||
desc = ""
|
||||
icon = 'icons/obj/biogenerator.dmi'
|
||||
icon_state = "biogen-stand"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 40
|
||||
var/processing = 0
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/points = 0
|
||||
var/menustat = "menu"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
|
||||
|
||||
on_reagent_change() //When the reagents change, change the icon as well.
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
if(!src.beaker)
|
||||
icon_state = "biogen-empty"
|
||||
else if(!src.processing)
|
||||
icon_state = "biogen-stand"
|
||||
else
|
||||
icon_state = "biogen-work"
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
if(beaker)
|
||||
user << "\red The biogenerator is already loaded."
|
||||
else
|
||||
user.before_take_item(O)
|
||||
O.loc = src
|
||||
beaker = O
|
||||
updateUsrDialog()
|
||||
else if(processing)
|
||||
user << "\red The biogenerator is currently processing."
|
||||
else if(istype(O, /obj/item/weapon/storage/bag/plants))
|
||||
var/i = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
||||
i++
|
||||
if(i >= 10)
|
||||
user << "\red The biogenerator is already full! Activate it."
|
||||
else
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
||||
G.loc = src
|
||||
i++
|
||||
if(i >= 10)
|
||||
user << "\blue You fill the biogenerator to its capacity."
|
||||
break
|
||||
if(i<10)
|
||||
user << "\blue You empty the plant bag into the biogenerator."
|
||||
|
||||
|
||||
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
user << "\red You cannot put this in [src.name]"
|
||||
else
|
||||
var/i = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
||||
i++
|
||||
if(i >= 10)
|
||||
user << "\red The biogenerator is full! Activate it."
|
||||
else
|
||||
user.before_take_item(O)
|
||||
O.loc = src
|
||||
user << "\blue You put [O.name] in [src.name]"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/interact(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<TITLE>Biogenerator</TITLE>Biogenerator:<BR>"
|
||||
if (processing)
|
||||
dat += "<FONT COLOR=red>Biogenerator is processing! Please wait...</FONT>"
|
||||
else
|
||||
dat += "Biomass: [points] points.<HR>"
|
||||
switch(menustat)
|
||||
if("menu")
|
||||
if (beaker)
|
||||
dat += "<A href='?src=\ref[src];action=activate'>Activate Biogenerator!</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=detach'>Detach Container</A><BR><BR>"
|
||||
dat += "Food<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=milk;cost=20'>10 milk</A> <FONT COLOR=blue>(20)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=meat;cost=50'>Slab of meat</A> <FONT COLOR=blue>(50)</FONT><BR>"
|
||||
dat += "Nutrient<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>(10)</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=50'>x5</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>(20)</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=100'>x5</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>(25)</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=125'>x5</A><BR>"
|
||||
dat += "Leather<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=wallet;cost=100'>Wallet</A> <FONT COLOR=blue>(100)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=gloves;cost=250'>Botanical gloves</A> <FONT COLOR=blue>(250)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=tbelt;cost=300'>Utility belt</A> <FONT COLOR=blue>(300)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=satchel;cost=400'>Leather Satchel</A> <FONT COLOR=blue>(400)</FONT><BR>"
|
||||
dat += "<A href='?src=\ref[src];action=create;item=cashbag;cost=400'>Cash Bag</A> <FONT COLOR=blue>(400)</FONT><BR>"
|
||||
//dat += "Other<BR>"
|
||||
//dat += "<A href='?src=\ref[src];action=create;item=monkey;cost=500'>Monkey</A> <FONT COLOR=blue>(500)</FONT><BR>"
|
||||
else
|
||||
dat += "<BR><FONT COLOR=red>No beaker inside. Please insert a beaker.</FONT><BR>"
|
||||
if("nopoints")
|
||||
dat += "You do not have biomass to create products.<BR>Please, put growns into reactor and activate it.<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
|
||||
if("complete")
|
||||
dat += "Operation complete.<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
|
||||
if("void")
|
||||
dat += "<FONT COLOR=red>Error: No growns inside.</FONT><BR>Please, put growns into reactor.<BR>"
|
||||
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
|
||||
user << browse(dat, "window=biogenerator")
|
||||
onclose(user, "biogenerator")
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/attack_hand(mob/user as mob)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/biogenerator/proc/activate()
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
if (src.stat != 0) //NOPOWER etc
|
||||
return
|
||||
if(src.processing)
|
||||
usr << "\red The biogenerator is in the process of working."
|
||||
return
|
||||
var/S = 0
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents)
|
||||
S += 5
|
||||
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
|
||||
points += 1
|
||||
else points += I.reagents.get_reagent_amount("nutriment")*10
|
||||
del(I)
|
||||
if(S)
|
||||
processing = 1
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
|
||||
use_power(S*30)
|
||||
sleep(S+15)
|
||||
processing = 0
|
||||
update_icon()
|
||||
else
|
||||
menustat = "void"
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/proc/create_product(var/item,var/cost)
|
||||
if(cost > points)
|
||||
menustat = "nopoints"
|
||||
return 0
|
||||
processing = 1
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
points -= cost
|
||||
sleep(30)
|
||||
switch(item)
|
||||
if("milk")
|
||||
beaker.reagents.add_reagent("milk",10)
|
||||
if("meat")
|
||||
new/obj/item/weapon/reagent_containers/food/snacks/meat(src.loc)
|
||||
if("ez")
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
if("l4z")
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
if("rh")
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
new/obj/item/nutrient/ez(src.loc)
|
||||
if("l4z5")
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
new/obj/item/nutrient/l4z(src.loc)
|
||||
if("rh5")
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
new/obj/item/nutrient/rh(src.loc)
|
||||
if("wallet")
|
||||
new/obj/item/weapon/storage/wallet(src.loc)
|
||||
if("gloves")
|
||||
new/obj/item/clothing/gloves/botanic_leather(src.loc)
|
||||
if("tbelt")
|
||||
new/obj/item/weapon/storage/belt/utility(src.loc)
|
||||
if("satchel")
|
||||
new/obj/item/weapon/storage/backpack/satchel(src.loc)
|
||||
if("cashbag")
|
||||
new/obj/item/weapon/storage/bag/cash(src.loc)
|
||||
if("monkey")
|
||||
new/mob/living/carbon/monkey(src.loc)
|
||||
processing = 0
|
||||
menustat = "complete"
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/machinery/biogenerator/Topic(href, href_list)
|
||||
if(stat & BROKEN) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
usr.set_machine(src)
|
||||
|
||||
switch(href_list["action"])
|
||||
if("activate")
|
||||
activate()
|
||||
if("detach")
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker = null
|
||||
update_icon()
|
||||
if("create")
|
||||
create_product(href_list["item"],text2num(href_list["cost"]))
|
||||
if("menu")
|
||||
menustat = "menu"
|
||||
updateUsrDialog()
|
||||
@@ -0,0 +1,249 @@
|
||||
// **********************
|
||||
// Other harvested materials from plants (that are not food)
|
||||
// **********************
|
||||
|
||||
/obj/item/weapon/grown // Grown weapons
|
||||
name = "grown_weapon"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
var/seed = ""
|
||||
var/plantname = ""
|
||||
var/productname = ""
|
||||
var/species = ""
|
||||
var/lifespan = 20
|
||||
var/endurance = 15
|
||||
var/maturation = 7
|
||||
var/production = 7
|
||||
var/yield = 2
|
||||
var/potency = 1
|
||||
var/plant_type = 0
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
/obj/item/weapon/grown/proc/changePotency(newValue) //-QualityVan
|
||||
potency = newValue
|
||||
|
||||
/obj/item/weapon/grown/log
|
||||
name = "tower-cap log"
|
||||
desc = "It's better than bad, it's good!"
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon_state = "logs"
|
||||
force = 5
|
||||
flags = TABLEPASS
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
plant_type = 2
|
||||
origin_tech = "materials=1"
|
||||
seed = "/obj/item/seeds/towermycelium"
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
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)
|
||||
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!
|
||||
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
|
||||
flags = TABLEPASS
|
||||
throwforce = 1
|
||||
w_class = 1.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
plant_type = 1
|
||||
seed = "/obj/item/seeds/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>"
|
||||
|
||||
/*
|
||||
/obj/item/weapon/grown/gibtomato
|
||||
desc = "A plump tomato."
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
name = "Gib Tomato"
|
||||
icon_state = "gibtomato"
|
||||
damtype = "fire"
|
||||
force = 0
|
||||
flags = TABLEPASS
|
||||
throwforce = 1
|
||||
w_class = 2.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
plant_type = 1
|
||||
seed = "/obj/item/seeds/gibtomato"
|
||||
New()
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/grown/gibtomato/New()
|
||||
..()
|
||||
src.gibs = new /obj/effect/gibspawner/human(get_turf(src))
|
||||
src.gibs.attach(src)
|
||||
src.smoke.set_up(10, 0, usr.loc)
|
||||
*/
|
||||
/obj/item/weapon/grown/nettle // -- Skie
|
||||
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
|
||||
flags = TABLEPASS
|
||||
throwforce = 1
|
||||
w_class = 2.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
plant_type = 1
|
||||
origin_tech = "combat=1"
|
||||
seed = "/obj/item/seeds/nettleseed"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
|
||||
reagents.add_reagent("sacid", round(potency, 1))
|
||||
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
|
||||
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
|
||||
flags = TABLEPASS
|
||||
throwforce = 1
|
||||
w_class = 2.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
plant_type = 1
|
||||
seed = "/obj/item/seeds/deathnettleseed"
|
||||
origin_tech = "combat=3"
|
||||
attack_verb = list("stung")
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
|
||||
reagents.add_reagent("pacid", round(potency, 1))
|
||||
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)
|
||||
..()
|
||||
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
|
||||
@@ -0,0 +1,254 @@
|
||||
//Analyzer, pestkillers, weedkillers, nutrients, hatchets.
|
||||
|
||||
|
||||
/obj/item/device/analyzer/plant_analyzer
|
||||
name = "plant analyzer"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "hydro"
|
||||
item_state = "analyzer"
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
return 0
|
||||
|
||||
|
||||
// *************************************
|
||||
// Pestkiller defines for hydroponics
|
||||
// *************************************
|
||||
|
||||
/obj/item/pestkiller
|
||||
name = "bottle of pestkiller"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
flags = FPRINT | TABLEPASS
|
||||
var/toxicity = 0
|
||||
var/PestKillStr = 0
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/pestkiller/carbaryl
|
||||
name = "bottle of carbaryl"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
flags = FPRINT | TABLEPASS
|
||||
toxicity = 4
|
||||
PestKillStr = 2
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/pestkiller/lindane
|
||||
name = "bottle of lindane"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle18"
|
||||
flags = FPRINT | TABLEPASS
|
||||
toxicity = 6
|
||||
PestKillStr = 4
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/pestkiller/phosmet
|
||||
name = "bottle of phosmet"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle15"
|
||||
flags = FPRINT | TABLEPASS
|
||||
toxicity = 8
|
||||
PestKillStr = 7
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
// *************************************
|
||||
// Hydroponics Tools
|
||||
// *************************************
|
||||
|
||||
/obj/item/weapon/weedspray // -- Skie
|
||||
desc = "It's a toxic mixture, in spray form, to kill small weeds."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
name = "weed-spray"
|
||||
icon_state = "weedspray"
|
||||
item_state = "spray"
|
||||
flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 4
|
||||
w_class = 2.0
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
var/toxicity = 4
|
||||
var/WeedKillStr = 2
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</b>"
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/pestspray // -- Skie
|
||||
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
name = "pest-spray"
|
||||
icon_state = "pestspray"
|
||||
item_state = "spray"
|
||||
flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 4
|
||||
w_class = 2.0
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
var/toxicity = 4
|
||||
var/PestKillStr = 2
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</b>"
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/minihoe // -- Numbers
|
||||
name = "mini hoe"
|
||||
desc = "It's used for removing weeds or scratching your back."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "hoe"
|
||||
item_state = "hoe"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
w_class = 2.0
|
||||
m_amt = 50
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
|
||||
|
||||
// *************************************
|
||||
// Weedkiller defines for hydroponics
|
||||
// *************************************
|
||||
|
||||
/obj/item/weedkiller
|
||||
name = "bottle of weedkiller"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
flags = FPRINT | TABLEPASS
|
||||
var/toxicity = 0
|
||||
var/WeedKillStr = 0
|
||||
|
||||
/obj/item/weedkiller/triclopyr
|
||||
name = "bottle of glyphosate"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
flags = FPRINT | TABLEPASS
|
||||
toxicity = 4
|
||||
WeedKillStr = 2
|
||||
|
||||
/obj/item/weedkiller/lindane
|
||||
name = "bottle of triclopyr"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle18"
|
||||
flags = FPRINT | TABLEPASS
|
||||
toxicity = 6
|
||||
WeedKillStr = 4
|
||||
|
||||
/obj/item/weedkiller/D24
|
||||
name = "bottle of 2,4-D"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle15"
|
||||
flags = FPRINT | TABLEPASS
|
||||
toxicity = 8
|
||||
WeedKillStr = 7
|
||||
|
||||
|
||||
// *************************************
|
||||
// Nutrient defines for hydroponics
|
||||
// *************************************
|
||||
|
||||
/obj/item/nutrient
|
||||
name = "bottle of nutrient"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
flags = FPRINT | TABLEPASS
|
||||
w_class = 2.0
|
||||
var/mutmod = 0
|
||||
var/yieldmod = 0
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/nutrient/ez
|
||||
name = "bottle of E-Z-Nutrient"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
flags = FPRINT | TABLEPASS
|
||||
mutmod = 1
|
||||
yieldmod = 1
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/nutrient/l4z
|
||||
name = "bottle of Left 4 Zed"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle18"
|
||||
flags = FPRINT | TABLEPASS
|
||||
mutmod = 2
|
||||
yieldmod = 0
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/nutrient/rh
|
||||
name = "bottle of Robust Harvest"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle15"
|
||||
flags = FPRINT | TABLEPASS
|
||||
mutmod = 0
|
||||
yieldmod = 2
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
|
||||
//Hatchets and things to kill kudzu
|
||||
/obj/item/weapon/hatchet
|
||||
name = "hatchet"
|
||||
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "hatchet"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
force = 12.0
|
||||
w_class = 2.0
|
||||
throwforce = 15.0
|
||||
throw_speed = 4
|
||||
throw_range = 4
|
||||
m_amt = 15000
|
||||
origin_tech = "materials=2;combat=1"
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/hatchet/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
//If it's a hatchet it goes here. I guess
|
||||
/obj/item/weapon/hatchet/unathiknife
|
||||
name = "duelling knife"
|
||||
desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "unathiknife"
|
||||
attack_verb = list("ripped", "torn", "cut")
|
||||
|
||||
|
||||
/obj/item/weapon/scythe
|
||||
icon_state = "scythe0"
|
||||
name = "scythe"
|
||||
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
|
||||
force = 13.0
|
||||
throwforce = 5.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
w_class = 4.0
|
||||
flags = FPRINT | TABLEPASS | NOSHIELD
|
||||
slot_flags = SLOT_BACK
|
||||
origin_tech = "materials=2;combat=2"
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
|
||||
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(A, /obj/effect/spacevine))
|
||||
for(var/obj/effect/spacevine/B in orange(A,1))
|
||||
if(prob(80))
|
||||
del B
|
||||
del A
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user