/
kudzu.dm
105 lines (89 loc) · 3.53 KB
/
kudzu.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// A very special plant, deserving it's own file.
/obj/item/seeds/kudzu
name = "pack of kudzu seeds"
desc = "These seeds grow into a weed that grows incredibly fast."
icon_state = "seed-kudzu"
species = "kudzu"
plantname = "Kudzu"
product = /obj/item/reagent_containers/food/snacks/grown/kudzupod
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/plant_type/weed_hardy)
lifespan = 20
endurance = 10
yield = 4
growthstages = 4
rarity = 30
var/list/mutations = list()
reagents_add = list("charcoal" = 0.04, "nutriment" = 0.02)
/obj/item/seeds/kudzu/Copy()
var/obj/item/seeds/kudzu/S = ..()
S.mutations = mutations.Copy()
return S
/obj/item/seeds/kudzu/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] swallows the pack of kudzu seeds! It looks like [user.p_theyre()] trying to commit suicide!</span>")
plant(user)
return (BRUTELOSS)
/obj/item/seeds/kudzu/proc/plant(mob/user)
if(isspaceturf(user.loc))
return
if(!isturf(user.loc))
to_chat(user, "<span class='warning'>You need more space to plant [src].</span>")
return FALSE
if(locate(/obj/structure/spacevine) in user.loc)
to_chat(user, "<span class='warning'>There is too much kudzu here to plant [src].</span>")
return FALSE
to_chat(user, "<span class='notice'>You plant [src].</span>")
message_admins("Kudzu planted by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(user)]",0,1)
investigate_log("was planted by [key_name(user)] at [COORD(user)]", INVESTIGATE_BOTANY)
new /datum/spacevine_controller(get_turf(user), mutations, potency, production)
qdel(src)
/obj/item/seeds/kudzu/attack_self(mob/user)
user.visible_message("<span class='danger'>[user] begins throwing seeds on the ground...</span>")
if(do_after(user, 50, needhand = 1, target = user, progress = 1))
plant(user)
to_chat(user, "<span class='notice'>You plant the kudzu. You monster.</span>")
/obj/item/seeds/kudzu/get_analyzer_text()
var/text = ..()
var/text_string = ""
for(var/datum/spacevine_mutation/SM in mutations)
text_string += "[(text_string == "") ? "" : ", "][SM.name]"
text += "\n- Plant Mutations: [(text_string == "") ? "None" : text_string]"
return text
/obj/item/seeds/kudzu/on_chem_reaction(datum/reagents/S)
var/list/temp_mut_list = list()
if(S.has_reagent("sterilizine", 5))
for(var/datum/spacevine_mutation/SM in mutations)
if(SM.quality == NEGATIVE)
temp_mut_list += SM
if(prob(20) && temp_mut_list.len)
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent("welding_fuel", 5))
for(var/datum/spacevine_mutation/SM in mutations)
if(SM.quality == POSITIVE)
temp_mut_list += SM
if(prob(20) && temp_mut_list.len)
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent("phenol", 5))
for(var/datum/spacevine_mutation/SM in mutations)
if(SM.quality == MINOR_NEGATIVE)
temp_mut_list += SM
if(prob(20) && temp_mut_list.len)
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent("blood", 15))
adjust_production(rand(15, -5))
if(S.has_reagent("amatoxin", 5))
adjust_production(rand(5, -15))
if(S.has_reagent("plasma", 5))
adjust_potency(rand(5, -15))
if(S.has_reagent("holywater", 10))
adjust_potency(rand(15, -5))
/obj/item/reagent_containers/food/snacks/grown/kudzupod
seed = /obj/item/seeds/kudzu
name = "kudzu pod"
desc = "<I>Pueraria Virallis</I>: An invasive species with vines that rapidly creep and wrap around whatever they contact."
icon_state = "kudzupod"
filling_color = "#6B8E23"
bitesize_mod = 2
foodtype = VEGETABLES | GROSS