mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-20 18:47:20 +01:00
* refactor: Attack chain, initial setup. * migrate curtain to make dreamchecker happy * update thurible * don't call attacked_by separately for legacy attack chain * remove duplicate proc * condense similar code, put allowances for legacy code in new procs * update docs, include diagram source * add comment on how to update diagram * fix admonition * mindflayer updates * remove commented out code * clarify all steps * after_attack should be overridable * whoops * retrofit recent changes * duh, can't restrict this yet because of tool_acts * i hate ore bags with the fire of a thousand suns * return correct value for object attack logic * Various cleanups. We don't want to attempt to pull stuff out of `/obj/item/attackby`, because those pieces are part of the related objects' migrations, not `/obj/item` itself. Attempting to do this causes knockon effects where things expected to call e.g. `/obj/item/storage/attackby` in the call chain were not ferried over to the new item interaction code, because the related objects hadn't actually been migrated over yet. I've used refactoring /obj/vehicle as the example for migrating `attackby` methods instead. * simplify some argument names * fuck it * make it do the thing * Rename CI module call * Prove that CI works * improve test output * aaand fix it again * fix curtain tool interactions * fix compile error * fix compile error * Better docs, introduce migration plan tool.
100 lines
3.3 KiB
Plaintext
100 lines
3.3 KiB
Plaintext
// 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/food/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, "plantmatter" = 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
|
|
var/turf/T = get_turf(src)
|
|
message_admins("Kudzu planted by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) at ([T.x],[T.y],[T.z] - <A href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a>)",0,1)
|
|
investigate_log("was planted by [key_name(user)] at ([T.x],[T.y],[T.z])","kudzu")
|
|
new /obj/structure/spacevine_controller(user.loc, mutations, potency, production)
|
|
user.drop_item()
|
|
qdel(src)
|
|
|
|
/obj/item/seeds/kudzu/attack_self__legacy__attackchain(mob/user)
|
|
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 as anything in mutations)
|
|
text_string += "[(text_string == "") ? "" : ", "][initial(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 as anything in mutations)
|
|
if(initial(SM.quality) == SPACEVINE_MUTATION_NEGATIVE)
|
|
temp_mut_list += SM
|
|
if(prob(20) && length(temp_mut_list))
|
|
mutations.Remove(pick(temp_mut_list))
|
|
temp_mut_list.Cut()
|
|
|
|
if(S.has_reagent("fuel", 5))
|
|
for(var/datum/spacevine_mutation/SM as anything in mutations)
|
|
if(initial(SM.quality) == SPACEVINE_MUTATION_POSITIVE)
|
|
temp_mut_list += SM
|
|
if(prob(20) && length(temp_mut_list))
|
|
mutations.Remove(pick(temp_mut_list))
|
|
temp_mut_list.Cut()
|
|
|
|
if(S.has_reagent("phenol", 5))
|
|
for(var/datum/spacevine_mutation/SM as anything in mutations)
|
|
if(initial(SM.quality) == SPACEVINE_MUTATION_MINOR_NEGATIVE)
|
|
temp_mut_list += SM
|
|
if(prob(20) && length(temp_mut_list))
|
|
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("amanitin", 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/food/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
|
|
tastes = list("kudzu" = 1)
|
|
wine_power = 0.2
|