Migrate seeds to the new attack chain. (#32326)

* Migrate seeds to the new attack chain.

* Apply suggestion from CRUNCH review.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

---------

Signed-off-by: Alan <alfalfascout@users.noreply.github.com>
Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
This commit is contained in:
Alan
2026-07-24 19:35:48 +00:00
committed by GitHub
co-authored by CRUNCH
parent f6b53ff47d
commit 6d36af8e5b
3 changed files with 36 additions and 29 deletions
+5 -1
View File
@@ -36,9 +36,13 @@
user.drop_item()
qdel(src)
/obj/item/seeds/kudzu/attack_self__legacy__attackchain(mob/user)
/obj/item/seeds/kudzu/activate_self(mob/user)
if(..())
return ITEM_INTERACT_COMPLETE
plant(user)
to_chat(user, SPAN_NOTICE("You plant the kudzu. You monster."))
return ITEM_INTERACT_COMPLETE
/obj/item/seeds/kudzu/get_analyzer_text()
var/text = ..()
+21 -21
View File
@@ -25,27 +25,28 @@
mind = null
return ..()
/obj/item/seeds/replicapod/attackby__legacy__attackchain(obj/item/W, mob/user, params)
if(istype(W,/obj/item/reagent_containers/syringe))
if(!contains_sample)
for(var/datum/reagent/blood/bloodSample in W.reagents.reagent_list)
var/datum/dna/dna = bloodSample.data["dna"]
if(bloodSample.data["mind"] && bloodSample.data["cloneable"] && !(NO_CLONESCAN in dna.species.species_traits))
mind = bloodSample.data["mind"]
ckey = bloodSample.data["ckey"]
realName = bloodSample.data["real_name"]
blood_gender = bloodSample.data["gender"]
blood_type = bloodSample.data["blood_type"]
factions = bloodSample.data["factions"]
W.reagents.clear_reagents()
to_chat(user, SPAN_NOTICE("You inject the contents of the syringe into the seeds."))
contains_sample = 1
else
to_chat(user, SPAN_WARNING("The seeds reject the sample!"))
else
to_chat(user, SPAN_WARNING("The seeds already contain a genetic sample!"))
else
/obj/item/seeds/replicapod/item_interaction(mob/user, obj/item/used, list/modifiers)
if(!istype(used, /obj/item/reagent_containers/syringe))
return ..()
if(contains_sample)
to_chat(user, SPAN_WARNING("The seeds already contain a genetic sample!"))
return ITEM_INTERACT_COMPLETE
for(var/datum/reagent/blood/bloodSample in used.reagents.reagent_list)
var/datum/dna/dna = bloodSample.data["dna"]
if(!(bloodSample.data["mind"] && bloodSample.data["cloneable"] && !(NO_CLONESCAN in dna.species.species_traits)))
to_chat(user, SPAN_WARNING("The seeds reject the sample!"))
return ITEM_INTERACT_COMPLETE
mind = bloodSample.data["mind"]
ckey = bloodSample.data["ckey"]
realName = bloodSample.data["real_name"]
blood_gender = bloodSample.data["gender"]
blood_type = bloodSample.data["blood_type"]
factions = bloodSample.data["factions"]
used.reagents.clear_reagents()
to_chat(user, SPAN_NOTICE("You inject the contents of the syringe into the seeds."))
contains_sample = 1
add_fingerprint(user)
return ITEM_INTERACT_COMPLETE
/obj/item/seeds/replicapod/get_analyzer_text()
var/text = ..()
@@ -53,7 +54,6 @@
text += "\n It contains a blood sample!"
return text
/obj/item/seeds/replicapod/harvest(mob/user, obj/item/storage/bag/plants/bag)
var/obj/machinery/hydroponics/parent = loc
var/make_podman = 0
+10 -7
View File
@@ -37,6 +37,7 @@
var/weed_chance = 5
/// If weed chance passes, this many weeds sprout during growth
var/weed_rate = 1
new_attack_chain = TRUE
/// The size of a small mutation for each stat.
var/static/list/stat_mutation_sizes = list(
@@ -394,19 +395,21 @@
/obj/item/seeds/proc/on_chem_reaction(datum/reagents/S) // In case seeds have some special interaction with special chems
return
/obj/item/seeds/attackby__legacy__attackchain(obj/item/O, mob/user, params)
if(istype(O, /obj/item/plant_analyzer))
/obj/item/seeds/item_interaction(mob/user, obj/item/used, list/modifiers)
if(istype(used, /obj/item/plant_analyzer))
to_chat(user, SPAN_NOTICE("This is \a [SPAN_NAME("[src].")]"))
var/text = get_analyzer_text()
if(text)
to_chat(user, SPAN_NOTICE("[text]"))
to_chat(user, SPAN_NOTICE(text))
return
if(is_pen(O))
return ITEM_INTERACT_COMPLETE
if(is_pen(used))
variant_prompt(user)
return
..() // Fallthrough to item/attackby() so that bags can pick seeds up
add_fingerprint(user)
return ITEM_INTERACT_COMPLETE
return ..() // Fall through to parent so that bags can pick seeds up.
/obj/item/seeds/proc/variant_prompt(mob/user, obj/item/container = null)
var/prev = variant