Removes Weapons (#7415)

* Adds icon and hitsound where needed.

* Moves alt_attack to /obj/item and deletes weapons.dm

* Replaced /obj/item/weapon with /obj/item

* Fixes merge issues.

* Fix merge issues.
This commit is contained in:
Werner
2019-11-16 18:36:13 +01:00
committed by GitHub
parent 128ca2235b
commit af16a489a6
1123 changed files with 27193 additions and 27175 deletions

View File

@@ -227,11 +227,11 @@
honey += processing
processing = 0
icon_state = "centrifuge"
else if(istype(I, /obj/item/weapon/reagent_containers/glass))
else if(istype(I, /obj/item/reagent_containers/glass))
if(!honey)
to_chat(user, "<span class='notice'>There is no honey in \the [src].</span>")
return
var/obj/item/weapon/reagent_containers/glass/G = I
var/obj/item/reagent_containers/glass/G = I
var/transferred = min(G.reagents.maximum_volume - G.reagents.total_volume, honey)
G.reagents.add_reagent("honey", transferred)
honey -= transferred
@@ -284,7 +284,7 @@
recipes = wax_recipes
var/global/list/datum/stack_recipe/wax_recipes = list( \
new/datum/stack_recipe("candle", /obj/item/weapon/flame/candle) \
new/datum/stack_recipe("candle", /obj/item/flame/candle) \
)
/obj/item/bee_pack

View File

@@ -1,4 +1,4 @@
/obj/item/weapon/bee_net
/obj/item/bee_net
name = "bee net"
desc = "For catching rogue bees."
icon = 'icons/obj/apiary_bees_etc.dmi'
@@ -8,14 +8,14 @@
var/caught_bees = 0
var/feralbees
/obj/item/weapon/bee_net/examine(var/mob/user)
/obj/item/bee_net/examine(var/mob/user)
..()
if (caught_bees)
to_chat(user, span("notice", "It contains [caught_bees] bees"))
else
to_chat(user, span("notice", "It is empty"))
/obj/item/weapon/bee_net/attack_self(mob/user as mob)
/obj/item/bee_net/attack_self(mob/user as mob)
var/turf/T = get_step(get_turf(user), user.dir)
for(var/mob/living/simple_animal/bee/B in T)
capture_bees(B, user)
@@ -24,7 +24,7 @@
/obj/item/weapon/bee_net/resolve_attackby(atom/A, mob/user, var/click_parameters)
/obj/item/bee_net/resolve_attackby(atom/A, mob/user, var/click_parameters)
if (istype(A, /turf))
var/turf/T = A
for(var/mob/living/simple_animal/bee/B in T)
@@ -39,7 +39,7 @@
..(A, user, click_parameters)
/obj/item/weapon/bee_net/proc/capture_bees(var/mob/living/simple_animal/bee/target, var/mob/living/user)
/obj/item/bee_net/proc/capture_bees(var/mob/living/simple_animal/bee/target, var/mob/living/user)
if (user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN*2)//make it harder to spamclick bees into submission
@@ -95,7 +95,7 @@
/obj/item/weapon/bee_net/proc/deposit_bees(var/obj/machinery/beehive/newhome, var/mob/user)
/obj/item/bee_net/proc/deposit_bees(var/obj/machinery/beehive/newhome, var/mob/user)
if (!newhome.closed)
var/delta = min(100 - newhome.bee_count, caught_bees)
@@ -109,7 +109,7 @@
else
to_chat(user, span("warning", "You'll have to open the lid before you can place bees inside"))
/obj/item/weapon/bee_net/verb/empty_bees()
/obj/item/bee_net/verb/empty_bees()
set src in usr
set name = "Empty bee net"
set category = "Object"

View File

@@ -1,6 +1,6 @@
//The bee smoker, a device that burns welder fuel to make lots of smoke that obscures vision
//Useful for dealing with angry bees, or for antagonist gardeners to confuse and flee from armed security.
/obj/item/weapon/bee_smoker
/obj/item/bee_smoker
name = "Bee smoker"
desc = "An archaic contraption that slowly burns welding fuel to create thick clouds of smoke, and directs it with attached bellows, used to control angry bees and calm them before harvesting honey."
icon = 'icons/obj/beekeeping.dmi'
@@ -10,11 +10,11 @@
w_class = 4//Big clunky thing
var/max_fuel = 60
/obj/item/weapon/bee_smoker/examine(mob/user)
/obj/item/bee_smoker/examine(mob/user)
if(..(user, 0))
to_chat(user, text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel ))
/obj/item/weapon/bee_smoker/New()
/obj/item/bee_smoker/New()
..()
var/datum/reagents/R = new/datum/reagents(max_fuel)
reagents = R
@@ -22,7 +22,7 @@
//Bee smoker intentionally spawns empty. Fill it at a weldertank before use
//I would prefer to rename this to attack(), but that would involve touching hundreds of files.
/obj/item/weapon/bee_smoker/resolve_attackby(atom/A, mob/user, var/click_parameters)
/obj/item/bee_smoker/resolve_attackby(atom/A, mob/user, var/click_parameters)
if (istype(A, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,A) <= 1)
A.reagents.trans_to_obj(src, max_fuel)
to_chat(user, "<span class='notice'>Smoker refilled!</span>")
@@ -46,16 +46,16 @@
//Afterattack can only be called for longdistance clicks, since those skip the attackby
/obj/item/weapon/bee_smoker/afterattack(atom/A, mob/user)
/obj/item/bee_smoker/afterattack(atom/A, mob/user)
..()
smoke_at(A)
/obj/item/weapon/bee_smoker/proc/get_fuel()
/obj/item/bee_smoker/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
/obj/item/weapon/bee_smoker/proc/remove_fuel(var/amount = 1, var/mob/M = null)
/obj/item/bee_smoker/proc/remove_fuel(var/amount = 1, var/mob/M = null)
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
return 1
@@ -64,7 +64,7 @@
to_chat(M, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return 0
/obj/item/weapon/bee_smoker/proc/smoke_at(var/atom/A)
/obj/item/bee_smoker/proc/smoke_at(var/atom/A)
if (!istype(A, /turf) && !istype(A.loc, /turf) )//Safety to prevent firing smoke at your own backpack
return

View File

@@ -1,5 +1,5 @@
//Grown foods.
/obj/item/weapon/reagent_containers/food/snacks/grown
/obj/item/reagent_containers/food/snacks/grown
name = "fruit"
icon = 'icons/obj/hydroponics_products.dmi'
@@ -12,7 +12,7 @@
var/datum/seed/seed
var/potency = -1
/obj/item/weapon/reagent_containers/food/snacks/grown/Initialize(loca, planttype)
/obj/item/reagent_containers/food/snacks/grown/Initialize(loca, planttype)
. = ..()
if(!dried_type)
dried_type = type
@@ -60,7 +60,7 @@
if(reagents.total_volume > 0)
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/weapon/reagent_containers/food/snacks/grown/proc/update_desc()
/obj/item/reagent_containers/food/snacks/grown/proc/update_desc()
if(!seed)
return
@@ -125,7 +125,7 @@
SSplants.product_descs["[seed.uid]"] = desc
desc += ". Delicious! Probably."
/obj/item/weapon/reagent_containers/food/snacks/grown/update_icon()
/obj/item/reagent_containers/food/snacks/grown/update_icon()
if(!seed || !SSplants || !SSplants.plant_icon_cache)
return
cut_overlays()
@@ -145,7 +145,7 @@
SSplants.plant_icon_cache[icon_key] = plant_icon
add_overlay(plant_icon)
/obj/item/weapon/reagent_containers/food/snacks/grown/Crossed(var/mob/living/M)
/obj/item/reagent_containers/food/snacks/grown/Crossed(var/mob/living/M)
if(seed && seed.get_trait(TRAIT_JUICY) == 2)
if(istype(M))
@@ -167,11 +167,11 @@
if(src) qdel(src)
return
/obj/item/weapon/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
/obj/item/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
if(seed) seed.thrown_at(src,hit_atom)
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(var/obj/item/weapon/W, var/mob/user)
/obj/item/reagent_containers/food/snacks/grown/attackby(var/obj/item/W, var/mob/user)
if(seed)
if(seed.get_trait(TRAIT_PRODUCES_POWER) && W.iscoil())
@@ -179,7 +179,7 @@
if(C.use(5))
//TODO: generalize this.
to_chat(user, "<span class='notice'>You add some cable to the [src.name] and slide it inside the battery casing.</span>")
var/obj/item/weapon/cell/potato/pocell = new /obj/item/weapon/cell/potato(get_turf(user))
var/obj/item/cell/potato/pocell = new /obj/item/cell/potato(get_turf(user))
if(src.loc == user && !(user.l_hand && user.r_hand) && istype(user,/mob/living/carbon/human))
user.put_in_hands(pocell)
pocell.maxcharge = src.potency * 10
@@ -193,7 +193,7 @@
qdel(src)
return
else if(seed.chems)
if(istype(W,/obj/item/weapon/material/hatchet) && !isnull(seed.chems["woodpulp"]))
if(istype(W,/obj/item/material/hatchet) && !isnull(seed.chems["woodpulp"]))
user.show_message("<span class='notice'>You make planks out of \the [src]!</span>", 1)
playsound(loc, 'sound/effects/woodcutting.ogg', 50, 1)
var/flesh_colour = seed.get_trait(TRAIT_FLESH_COLOUR)
@@ -212,17 +212,17 @@
return
else if(!isnull(seed.chems["potato"]))
to_chat(user, "You slice \the [src] into sticks.")
new /obj/item/weapon/reagent_containers/food/snacks/rawsticks(get_turf(src))
new /obj/item/reagent_containers/food/snacks/rawsticks(get_turf(src))
qdel(src)
return
else if(!isnull(seed.chems["carrotjuice"]))
to_chat(user, "You slice \the [src] into sticks.")
new /obj/item/weapon/reagent_containers/food/snacks/carrotfries(get_turf(src))
new /obj/item/reagent_containers/food/snacks/carrotfries(get_turf(src))
qdel(src)
return
else if(!isnull(seed.chems["soymilk"]))
to_chat(user, "You roughly chop up \the [src].")
new /obj/item/weapon/reagent_containers/food/snacks/soydope(get_turf(src))
new /obj/item/reagent_containers/food/snacks/soydope(get_turf(src))
qdel(src)
return
else if(seed.get_trait(TRAIT_FLESH_COLOUR))
@@ -231,13 +231,13 @@
var/slices = rand(3,5)
var/reagents_to_transfer = reagents.total_volume/slices
for(var/i=0;i<slices;i++)
var/obj/item/weapon/reagent_containers/food/snacks/fruit_slice/F = new(get_turf(src),seed)
var/obj/item/reagent_containers/food/snacks/fruit_slice/F = new(get_turf(src),seed)
reagents.trans_to_obj(F,reagents_to_transfer)
qdel(src)
return
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
/obj/item/reagent_containers/food/snacks/grown/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
. = ..()
if(seed && seed.get_trait(TRAIT_STINGS))
@@ -253,7 +253,7 @@
to_chat(user, "<span class='danger'>\The [src] has fallen to bits.</span>")
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/grown/attack_self(mob/user as mob)
/obj/item/reagent_containers/food/snacks/grown/attack_self(mob/user as mob)
if(!seed)
return
@@ -309,7 +309,7 @@
return
*/
/obj/item/weapon/reagent_containers/food/snacks/grown/pickup(mob/user)
/obj/item/reagent_containers/food/snacks/grown/pickup(mob/user)
..()
if(!seed)
return
@@ -323,7 +323,7 @@
seed.do_thorns(H,src)
seed.do_sting(H,src,pick("r_hand","l_hand"))
/obj/item/weapon/reagent_containers/food/snacks/fruit_slice
/obj/item/reagent_containers/food/snacks/fruit_slice
name = "fruit slice"
desc = "A slice of some tasty fruit."
icon = 'icons/obj/hydroponics_misc.dmi'
@@ -331,7 +331,7 @@
var/list/fruit_icon_cache = list()
/obj/item/weapon/reagent_containers/food/snacks/fruit_slice/Initialize(mapload, datum/seed/S)
/obj/item/reagent_containers/food/snacks/fruit_slice/Initialize(mapload, datum/seed/S)
. = ..()
// Need to go through and make a general image caching controller. Todo.
if(!istype(S))

View File

@@ -2,13 +2,13 @@
// Other harvested materials from plants (that are not food)
// **********************
/obj/item/weapon/grown // Grown weapons
/obj/item/grown // Grown weapons
name = "grown_weapon"
icon = 'icons/obj/weapons.dmi'
var/plantname
var/potency = 1
/obj/item/weapon/grown/Initialize(newloc,planttype)
/obj/item/grown/Initialize(newloc,planttype)
. = ..()
var/datum/reagents/R = new/datum/reagents(50)
@@ -31,7 +31,7 @@
rtotal += round(potency/reagent_data[2])
reagents.add_reagent(rid,max(1,rtotal))
/obj/item/weapon/corncob
/obj/item/corncob
name = "corn cob"
desc = "A reminder of meals gone by."
icon = 'icons/obj/trash.dmi'
@@ -42,15 +42,15 @@
throw_speed = 4
throw_range = 20
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/corncob/attackby(obj/item/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/material/hatchet) || istype(W, /obj/item/weapon/material/kitchen/utensil/knife) || istype(W, /obj/item/weapon/material/knife) || istype(W, /obj/item/weapon/material/knife/ritual))
if(istype(W, /obj/item/circular_saw) || istype(W, /obj/item/material/hatchet) || istype(W, /obj/item/material/kitchen/utensil/knife) || istype(W, /obj/item/material/knife) || istype(W, /obj/item/material/knife/ritual))
to_chat(user, "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>")
new /obj/item/clothing/mask/smokable/pipe/cobpipe (user.loc)
qdel(src)
return
/obj/item/weapon/bananapeel
/obj/item/bananapeel
name = "banana peel"
desc = "A peel from a banana."
icon = 'icons/obj/trash.dmi'
@@ -61,7 +61,7 @@
throw_speed = 4
throw_range = 20
/obj/item/weapon/bananapeel/Crossed(AM as mob|obj)
/obj/item/bananapeel/Crossed(AM as mob|obj)
if (istype(AM, /mob/living))
var/mob/living/M = AM
M.slip("the [src.name]",4)

View File

@@ -1,31 +1,31 @@
// Predefined types for placing on the map.
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom
/obj/item/reagent_containers/food/snacks/grown/mushroom
plantname = "amanita"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap
/obj/item/reagent_containers/food/snacks/grown/mushroom/libertycap
plantname = "libertycap"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom
/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom
plantname = "glowshroom"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi
/obj/item/reagent_containers/food/snacks/grown/mushroom/reishi
plantname = "reishi"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/destroyingangel
/obj/item/reagent_containers/food/snacks/grown/mushroom/destroyingangel
plantname = "destroyingangel"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/ghostmushroom
/obj/item/reagent_containers/food/snacks/grown/mushroom/ghostmushroom
plantname = "ghostmushroom"
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris
/obj/item/reagent_containers/food/snacks/grown/ambrosiavulgaris
plantname = "ambrosia"
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus
/obj/item/reagent_containers/food/snacks/grown/ambrosiadeus
plantname = "ambrosiadeus"
/obj/item/weapon/reagent_containers/food/snacks/grown/kois
/obj/item/reagent_containers/food/snacks/grown/kois
plantname = "koisspore"
/obj/item/weapon/reagent_containers/food/snacks/grown/banana
/obj/item/reagent_containers/food/snacks/grown/banana
plantname = "banana"

View File

@@ -710,12 +710,12 @@
if(has_mob_product)
product = new has_mob_product(spawning_loc,name)
else
product = new /obj/item/weapon/reagent_containers/food/snacks/grown(spawning_loc,name)
product = new /obj/item/reagent_containers/food/snacks/grown(spawning_loc,name)
if(get_trait(TRAIT_PRODUCT_COLOUR))
if(!istype(product, /mob))
product.color = get_trait(TRAIT_PRODUCT_COLOUR)
if(istype(product,/obj/item/weapon/reagent_containers/food))
var/obj/item/weapon/reagent_containers/food/food = product
if(istype(product,/obj/item/reagent_containers/food))
var/obj/item/reagent_containers/food/food = product
food.filling_color = get_trait(TRAIT_PRODUCT_COLOUR)
if(mysterious)

View File

@@ -769,7 +769,7 @@
seed_name = "banana"
display_name = "banana tree"
chems = list("banana" = list(10,10))
trash_type = /obj/item/weapon/bananapeel
trash_type = /obj/item/bananapeel
kitchen_tag = "banana"
/datum/seed/banana/setup_traits()
@@ -792,7 +792,7 @@
display_name = "ears of corn"
chems = list("nutriment" = list(1,10), "cornoil" = list(1,10))
kitchen_tag = "corn"
trash_type = /obj/item/weapon/corncob
trash_type = /obj/item/corncob
/datum/seed/corn/setup_traits()
..()

View File

@@ -1,4 +1,4 @@
/obj/item/weapon/disk/botany
/obj/item/disk/botany
name = "flora data disk"
desc = "A small disk used for carrying data on plant genetics."
icon = 'icons/obj/hydroponics_machines.dmi'
@@ -8,12 +8,12 @@
var/list/genes = list()
var/genesource = "unknown"
/obj/item/weapon/disk/botany/New()
/obj/item/disk/botany/New()
..()
pixel_x = rand(-5,5)
pixel_y = rand(-5,5)
/obj/item/weapon/disk/botany/attack_self(var/mob/user as mob)
/obj/item/disk/botany/attack_self(var/mob/user as mob)
if(genes.len)
var/choice = alert(user, "Are you sure you want to wipe the disk?", "Xenobotany Data", "No", "Yes")
if(src && user && genes && choice && choice == "Yes" && user.Adjacent(get_turf(src)))
@@ -23,14 +23,14 @@
genes = list()
genesource = "unknown"
/obj/item/weapon/storage/box/botanydisk
/obj/item/storage/box/botanydisk
name = "flora disk box"
desc = "A box of flora data disks, apparently."
/obj/item/weapon/storage/box/botanydisk/fill()
/obj/item/storage/box/botanydisk/fill()
..()
for(var/i = 0;i<7;i++)
new /obj/item/weapon/disk/botany(src)
new /obj/item/disk/botany(src)
/obj/machinery/botany
icon = 'icons/obj/hydroponics_machines.dmi'
@@ -40,7 +40,7 @@
use_power = 1
var/obj/item/seeds/seed // Currently loaded seed packet.
var/obj/item/weapon/disk/botany/loaded_disk //Currently loaded data disk.
var/obj/item/disk/botany/loaded_disk //Currently loaded data disk.
var/open = 0
var/active = 0
@@ -79,7 +79,7 @@
visible_message("\icon[src] [src] beeps and spits out [loaded_disk].")
loaded_disk = null
/obj/machinery/botany/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/botany/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/seeds))
if(seed)
to_chat(user, "There is already a seed loaded.")
@@ -103,12 +103,12 @@
dismantle()
return
if(istype(W,/obj/item/weapon/disk/botany))
if(istype(W,/obj/item/disk/botany))
if(loaded_disk)
to_chat(user, "There is already a data disk loaded.")
return
else
var/obj/item/weapon/disk/botany/B = W
var/obj/item/disk/botany/B = W
if(B.genes && B.genes.len)
if(!disk_needs_genes)

View File

@@ -302,8 +302,8 @@
add(O)
user.visible_message("[user] puts \the [O.name] into \the [src].", "You put \the [O] into \the [src].")
return
else if (istype(O, /obj/item/weapon/storage/bag/plants))
var/obj/item/weapon/storage/P = O
else if (istype(O, /obj/item/storage/bag/plants))
var/obj/item/storage/P = O
var/loaded = 0
for(var/obj/item/seeds/G in P.contents)
++loaded
@@ -322,8 +322,8 @@
if (istype(O.loc, /mob))
var/mob/user = O.loc
user.remove_from_mob(O)
else if(istype(O.loc,/obj/item/weapon/storage))
var/obj/item/weapon/storage/S = O.loc
else if(istype(O.loc,/obj/item/storage))
var/obj/item/storage/S = O.loc
S.remove_from_storage(O, src)
O.forceMove(src)

View File

@@ -237,12 +237,12 @@
floor = 1
return 1
/obj/effect/plant/attackby(var/obj/item/weapon/W, var/mob/user)
/obj/effect/plant/attackby(var/obj/item/W, var/mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
SSplants.add_plant(src)
if(W.iswirecutter() || istype(W, /obj/item/weapon/scalpel))
if(W.iswirecutter() || istype(W, /obj/item/scalpel))
if(sampled)
to_chat(user, "<span class='warning'>\The [src] has already been sampled recently.</span>")
return

View File

@@ -446,8 +446,8 @@
/obj/machinery/portable_atmospherics/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
//A special case for if the container has only water, for manual watering with buckets
if (istype(O,/obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RC = O
if (istype(O,/obj/item/reagent_containers))
var/obj/item/reagent_containers/RC = O
if (RC.reagents.reagent_list.len == 1)
if (RC.reagents.has_reagent("water", 1))
if (waterlevel < maxWaterLevel)
@@ -462,7 +462,7 @@
if (O.is_open_container())
return 0
if(O.iswirecutter() || istype(O, /obj/item/weapon/scalpel))
if(O.iswirecutter() || istype(O, /obj/item/scalpel))
if(!seed)
to_chat(user, "There is nothing to take a sample from in \the [src].")
@@ -490,9 +490,9 @@
return
else if(istype(O, /obj/item/weapon/reagent_containers/syringe))
else if(istype(O, /obj/item/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/S = O
var/obj/item/reagent_containers/syringe/S = O
if (S.mode == 1)
if(seed)
@@ -536,7 +536,7 @@
else
to_chat(user, "<span class='danger'>\The [src] already has seeds in it!</span>")
else if (istype(O, /obj/item/weapon/material/minihoe)) // The minihoe
else if (istype(O, /obj/item/material/minihoe)) // The minihoe
if(weedlevel > 0)
user.visible_message("<span class='danger'>[user] starts uprooting the weeds.</span>", "<span class='danger'>You remove the weeds from the [src].</span>")
@@ -545,19 +545,19 @@
else
to_chat(user, "<span class='danger'>This plot is completely devoid of weeds. It doesn't need uprooting.</span>")
else if (istype(O, /obj/item/weapon/storage/bag/plants))
else if (istype(O, /obj/item/storage/bag/plants))
attack_hand(user)
var/obj/item/weapon/storage/bag/plants/S = O
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
var/obj/item/storage/bag/plants/S = O
for (var/obj/item/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
if(!S.can_be_inserted(G))
return
S.handle_item_insertion(G, 1)
else if ( istype(O, /obj/item/weapon/plantspray) )
else if ( istype(O, /obj/item/plantspray) )
var/obj/item/weapon/plantspray/spray = O
var/obj/item/plantspray/spray = O
user.remove_from_mob(O)
toxins += spray.toxicity
pestlevel -= spray.pest_kill_str

View File

@@ -62,7 +62,7 @@
else
to_chat(user, "<span class='notice'>You insert [O] into [src]. Now it just needs some bees.</span>")
qdel(O)
else if(istype(O, /obj/item/weapon/material/minihoe))
else if(istype(O, /obj/item/material/minihoe))
if(health > 0)
to_chat(user, "<span class='danger'>You begin to dislodge the apiary from the tray, the bees don't like that.</span>")
angry_swarm(user)
@@ -73,16 +73,16 @@
new /obj/item/apiary(src.loc)
to_chat(user, "<span class='warning'>You dislodge the apiary from the tray.</span>")
qdel(src)
else if(istype(O, /obj/item/weapon/bee_net))
var/obj/item/weapon/bee_net/N = O
else if(istype(O, /obj/item/bee_net))
var/obj/item/bee_net/N = O
if(N.caught_bees > 0)
to_chat(user, "<span class='notice'>You empty the bees into the apiary.</span>")
bees_in_hive += N.caught_bees
N.caught_bees = 0
else
to_chat(user, "<span class='notice'>There are no more bees in the net.</span>")
else if(istype(O, /obj/item/weapon/reagent_containers/glass))
var/obj/item/weapon/reagent_containers/glass/G = O
else if(istype(O, /obj/item/reagent_containers/glass))
var/obj/item/reagent_containers/glass/G = O
if(harvestable_honey > 0)
if(health > 0)
to_chat(user, "<span class='warning'>You begin to harvest the honey. The bees don't seem to like it.</span>")
@@ -231,7 +231,7 @@
while(health > 15)
health -= 15
var/obj/item/weapon/reagent_containers/food/snacks/honeycomb/H = new(src.loc)
var/obj/item/reagent_containers/food/snacks/honeycomb/H = new(src.loc)
if(toxic > 0)
H.reagents.add_reagent("toxin", toxic)

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/plantspray
/obj/item/plantspray
icon = 'icons/obj/hydroponics_machines.dmi'
item_state = "spray"
flags = NOBLUDGEON
@@ -12,37 +12,37 @@
var/pest_kill_str = 0
var/weed_kill_str = 0
/obj/item/weapon/plantspray/weeds // -- Skie
/obj/item/plantspray/weeds // -- Skie
name = "weed-spray"
desc = "It's a toxic mixture, in spray form, to kill small weeds."
icon_state = "weedspray"
weed_kill_str = 6
/obj/item/weapon/plantspray/pests
/obj/item/plantspray/pests
name = "pest-spray"
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
icon_state = "pestspray"
pest_kill_str = 6
/obj/item/weapon/plantspray/pests/old
/obj/item/plantspray/pests/old
name = "bottle of pestkiller"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
/obj/item/weapon/plantspray/pests/old/carbaryl
/obj/item/plantspray/pests/old/carbaryl
name = "bottle of carbaryl"
icon_state = "bottle16"
toxicity = 4
pest_kill_str = 2
/obj/item/weapon/plantspray/pests/old/lindane
/obj/item/plantspray/pests/old/lindane
name = "bottle of lindane"
icon_state = "bottle18"
toxicity = 6
pest_kill_str = 4
/obj/item/weapon/plantspray/pests/old/phosmet
/obj/item/plantspray/pests/old/phosmet
name = "bottle of phosmet"
icon_state = "bottle15"
toxicity = 8
@@ -84,7 +84,7 @@
// Nutrient defines for hydroponics
// *************************************
/obj/item/weapon/reagent_containers/glass/fertilizer
/obj/item/reagent_containers/glass/fertilizer
name = "fertilizer bottle"
desc = "A small glass bottle. Can hold up to 60 units."
icon = 'icons/obj/chemical.dmi'
@@ -99,7 +99,7 @@
amount_per_transfer_from_this = 10
volume = 60
/obj/item/weapon/reagent_containers/glass/fertilizer/Initialize()
/obj/item/reagent_containers/glass/fertilizer/Initialize()
. = ..()
src.pixel_x = rand(-5.0, 5)
@@ -108,17 +108,17 @@
if(fertilizer)
reagents.add_reagent(fertilizer,60)
/obj/item/weapon/reagent_containers/glass/fertilizer/ez
/obj/item/reagent_containers/glass/fertilizer/ez
name = "bottle of E-Z-Nutrient"
icon_state = "bottle16"
fertilizer = "eznutrient"
/obj/item/weapon/reagent_containers/glass/fertilizer/l4z
/obj/item/reagent_containers/glass/fertilizer/l4z
name = "bottle of Left 4 Zed"
icon_state = "bottle18"
fertilizer = "left4zed"
/obj/item/weapon/reagent_containers/glass/fertilizer/rh
/obj/item/reagent_containers/glass/fertilizer/rh
name = "bottle of Robust Harvest"
icon_state = "bottle15"
fertilizer = "robustharvest"

View File

@@ -10,8 +10,8 @@
maxWeedLevel = 10 // Retains the ability for soil to grow weeds, as it should.
/obj/machinery/portable_atmospherics/hydroponics/soil/attackby(var/obj/item/O as obj, var/mob/user as mob)
//A special case for if the container has only water, for manual watering with buckets
if (istype(O,/obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RC = O
if (istype(O,/obj/item/reagent_containers))
var/obj/item/reagent_containers/RC = O
if (RC.reagents.reagent_list.len == 1)
if (RC.reagents.has_reagent("water", 1))
if (waterlevel < maxWaterLevel)
@@ -23,9 +23,9 @@
to_chat(user, "The soil is saturated with water already.")
return 1
if(istype(O,/obj/item/weapon/tank))
if(istype(O,/obj/item/tank))
return
if(istype(O,/obj/item/weapon/shovel))
if(istype(O,/obj/item/shovel))
if(do_after(user, 50/O.toolspeed))
new /obj/item/stack/material/sandstone{amount = 3}(loc)
to_chat(user, "<span class='notice'>You remove the soil from the bed and dismantle the sandstone base.</span>")

View File

@@ -1,6 +1,6 @@
//Analyzer, pestkillers, weedkillers, nutrients, hatchets, cutters.
/obj/item/weapon/wirecutters/clippers
/obj/item/wirecutters/clippers
name = "plant clippers"
desc = "A tool used to take samples from plants."
@@ -33,7 +33,7 @@
if(!last_data)
to_chat(user, "There is no scan data to print.")
return
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
var/obj/item/paper/P = new /obj/item/paper(get_turf(src))
P.set_content_unsafe("paper - [form_title]", "[last_data]")
if(istype(user,/mob/living/carbon/human) && !(user.l_hand && user.r_hand))
user.put_in_hands(P)
@@ -51,15 +51,15 @@
var/datum/reagents/grown_reagents
if(istype(target,/obj/structure/table))
return ..()
else if(istype(target,/obj/item/weapon/reagent_containers/food/snacks/grown))
else if(istype(target,/obj/item/reagent_containers/food/snacks/grown))
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = target
var/obj/item/reagent_containers/food/snacks/grown/G = target
grown_seed = SSplants.seeds[G.plantname]
grown_reagents = G.reagents
else if(istype(target,/obj/item/weapon/grown))
else if(istype(target,/obj/item/grown))
var/obj/item/weapon/grown/G = target
var/obj/item/grown/G = target
grown_seed = SSplants.seeds[G.plantname]
grown_reagents = G.reagents