Files
Bubberstation/code/modules/hydroponics/grown/towercap.dm
2016-03-04 02:35:51 +03:00

92 lines
2.9 KiB
Plaintext

/obj/item/seeds/tower
name = "pack of tower-cap mycelium"
desc = "This mycelium grows into tower-cap mushrooms."
icon_state = "mycelium-tower"
species = "towercap"
plantname = "Tower Caps"
product = /obj/item/weapon/grown/log
lifespan = 80
endurance = 50
maturation = 15
production = 1
yield = 5
potency = 50
oneharvest = 1
growthstages = 3
plant_type = 2
mutatelist = list(/obj/item/seeds/tower/steel)
/obj/item/seeds/tower/steel
name = "pack of steel-cap mycelium"
desc = "This mycelium grows into steel logs."
icon_state = "mycelium-steelcap"
species = "steelcap"
plantname = "Steel Caps"
product = /obj/item/weapon/grown/log/steel
mutatelist = list()
rarity = 20
/obj/item/weapon/grown/log
seed = /obj/item/seeds/tower
name = "tower-cap log"
desc = "It's better than bad, it's good!"
icon_state = "logs"
force = 5
throwforce = 5
w_class = 3
throw_speed = 2
throw_range = 3
plant_type = 2
origin_tech = "materials=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
var/plank_type = /obj/item/stack/sheet/mineral/wood
var/plank_name = "wooden planks"
var/list/accepted = list(/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco,
/obj/item/weapon/reagent_containers/food/snacks/grown/tea,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat)
/obj/item/weapon/grown/log/attackby(obj/item/weapon/W, mob/user, params)
..()
if(W.sharpness)
user.show_message("<span class='notice'>You make [plank_name] out of \the [src]!</span>", 1)
var/obj/item/stack/plank = new plank_type(user.loc, 1 + round(potency / 25))
var/old_plank_amount = plank.amount
for(var/obj/item/stack/ST in user.loc)
if(ST != plank && istype(ST, plank_type) && ST.amount < ST.max_amount)
ST.attackby(plank, user) //we try to transfer all old unfinished stacks to the new stack we created.
if(plank.amount > old_plank_amount)
user << "<span class='notice'>You add the newly-formed [plank_name] to the stack. It now contains [plank.amount] [plank_name].</span>"
qdel(src)
if(is_type_in_list(W,accepted))
var/obj/item/weapon/reagent_containers/food/snacks/grown/leaf = W
if(leaf.dry)
user.show_message("<span class='notice'>You wrap \the [W] around the log, turning it into a torch!</span>")
var/obj/item/device/flashlight/flare/torch/T = new /obj/item/device/flashlight/flare/torch(user.loc)
usr.unEquip(W)
usr.put_in_active_hand(T)
qdel(leaf)
qdel(src)
return
else
usr << "<span class ='warning'>You must dry this first!</span>"
/obj/item/weapon/grown/log/tree
seed = null
name = "wood log"
desc = "TIMMMMM-BERRRRRRRRRRR!"
/obj/item/weapon/grown/log/steel
seed = /obj/item/seeds/tower/steel
name = "steel-cap log"
desc = "It's made of metal."
icon_state = "steellogs"
accepted = list()
plank_type = /obj/item/stack/rods
plank_name = "rods"