mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Migrate unsorted seeds to the new attack chain. (#32399)
* Migrate unsorted 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:
@@ -619,7 +619,7 @@
|
||||
icon_state = "seed" // Unknown plant seed - these shouldn't exist in-game.
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
new_attack_chain = TRUE
|
||||
var/datum/unsorted_seed/seed_data
|
||||
|
||||
/obj/item/unsorted_seeds/Initialize(mapload, obj/item/seeds/template, mutation_level, list/mutation_focus, seed_data_in = null)
|
||||
@@ -645,23 +645,31 @@
|
||||
/obj/item/unsorted_seeds/proc/sort(depth = 1)
|
||||
seed_data.transform(src, depth)
|
||||
|
||||
/obj/item/unsorted_seeds/attack_self__legacy__attackchain(mob/user)
|
||||
user.visible_message(SPAN_NOTICE("[user] crudely sorts through [src] by hand."), "<span class='notice'>You crudely sort through [src] by hand. This would be easier and more effective with some sort of tool.")
|
||||
/obj/item/unsorted_seeds/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] crudely sorts through [src] by hand."),
|
||||
SPAN_NOTICE("You crudely sort through [src] by hand. This would be easier and more effective with some sort of tool."),
|
||||
SPAN_HEAR("You hear shuffling seeds.")
|
||||
)
|
||||
if(do_after(user, 3 SECONDS, TRUE, src, must_be_held = TRUE))
|
||||
sort()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/unsorted_seeds/attackby__legacy__attackchain(obj/item/O, mob/user, params)
|
||||
if(istype(O, /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]"))
|
||||
/obj/item/unsorted_seeds/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(is_pen(used))
|
||||
to_chat(user, SPAN_WARNING("Sort it first."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return
|
||||
if(is_pen(O))
|
||||
to_chat(user, SPAN_NOTICE("Sort it first."))
|
||||
return
|
||||
..() // Fallthrough to item/attackby() so that bags can pick seeds up
|
||||
if(!istype(used, /obj/item/plant_analyzer))
|
||||
return ..()
|
||||
|
||||
to_chat(user, SPAN_NOTICE("This is \a [SPAN_NAME("[src].")]"))
|
||||
var/text = get_analyzer_text()
|
||||
if(text)
|
||||
to_chat(user, SPAN_NOTICE("[text]"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/unsorted_seeds/proc/get_analyzer_text(show_detail = TRUE)
|
||||
var/list/output = list()
|
||||
|
||||
Reference in New Issue
Block a user