mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 19:15:11 +01:00
Add plant fiber material/stacks
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
var/harvest_tool = null // The type of item used to harvest the plant.
|
||||
var/harvest_count = 0
|
||||
var/destroy_on_harvest = FALSE
|
||||
|
||||
var/randomize_harvest_count = TRUE
|
||||
var/max_harvests = 0
|
||||
@@ -53,6 +54,8 @@
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You harvest \the [AM] from \the [src].</span>")
|
||||
if(harvest_count >= max_harvests && destroy_on_harvest)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
..(W, user)
|
||||
@@ -66,11 +69,12 @@
|
||||
/obj/structure/flora/proc/spawn_harvest(var/path = null, var/mob/user = null)
|
||||
if(!ispath(path))
|
||||
return 0
|
||||
var/turf/Target = get_turf(src)
|
||||
|
||||
var/atom/movable/AM = new path()
|
||||
if(user)
|
||||
Target = get_turf(user)
|
||||
|
||||
var/atom/movable/AM = new path(Target)
|
||||
user.put_in_hands(AM)
|
||||
else
|
||||
AM.forceMove(drop_location())
|
||||
|
||||
harvest_count++
|
||||
return AM
|
||||
@@ -80,6 +84,12 @@
|
||||
name = "bush"
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
icon_state = "snowbush1"
|
||||
|
||||
destroy_on_harvest = TRUE
|
||||
harvest_tool = /obj/item/weapon/material/knife
|
||||
randomize_harvest_count = FALSE
|
||||
harvest_loot = list(/obj/item/stack/material/fiber = 1)
|
||||
max_harvests = 1
|
||||
|
||||
/obj/structure/flora/bush/New()
|
||||
..()
|
||||
@@ -99,6 +109,12 @@
|
||||
name = "bush"
|
||||
icon = 'icons/obj/flora/ausflora.dmi'
|
||||
icon_state = "firstbush_1"
|
||||
|
||||
destroy_on_harvest = TRUE
|
||||
harvest_tool = /obj/item/weapon/material/knife
|
||||
randomize_harvest_count = FALSE
|
||||
harvest_loot = list(/obj/item/stack/material/fiber = 1)
|
||||
max_harvests = 1
|
||||
|
||||
/obj/structure/flora/ausbushes/New()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user