From b3491f3d9fc6b4b19906dc82b5f042a008600504 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Tue, 18 Jun 2024 16:27:05 +1000 Subject: [PATCH] Sideport of Pyrelight modpack. --- maps/modpack_testing/modpack_testing.dm | 1 + maps/shaded_hills/shaded_hills.dm | 1 + mods/pyrelight/_pyrelight.dm | 2 + mods/pyrelight/_pyrelight.dme | 9 ++ mods/pyrelight/datum/culture.dm | 0 mods/pyrelight/datum/factions.dm | 0 mods/pyrelight/datum/locations.dm | 0 mods/pyrelight/datum/religions.dm | 0 mods/pyrelight/icons/fruit/debug.dmi | Bin 0 -> 256 bytes mods/pyrelight/icons/fruit/nightweave.dmi | Bin 0 -> 588 bytes mods/pyrelight/icons/plants/debug.dmi | Bin 0 -> 890 bytes mods/pyrelight/plants/_plants.dm | 111 ++++++++++++++++++ mods/pyrelight/plants/_plants.dme | 8 ++ mods/pyrelight/plants/_plot.dm | 0 mods/pyrelight/plants/_subsystem.dm | 4 + .../plants/fruit_subtypes/nightweave.dm | 39 ++++++ .../plants/plant_subtypes/nightweave.dm | 7 ++ mods/pyrelight/plants/plants_fruit.dm | 110 +++++++++++++++++ mods/pyrelight/plants/plants_fruit_segment.dm | 34 ++++++ .../pyrelight/plants/plants_fruit_template.dm | 66 +++++++++++ 20 files changed, 392 insertions(+) create mode 100644 mods/pyrelight/_pyrelight.dm create mode 100644 mods/pyrelight/_pyrelight.dme create mode 100644 mods/pyrelight/datum/culture.dm create mode 100644 mods/pyrelight/datum/factions.dm create mode 100644 mods/pyrelight/datum/locations.dm create mode 100644 mods/pyrelight/datum/religions.dm create mode 100644 mods/pyrelight/icons/fruit/debug.dmi create mode 100644 mods/pyrelight/icons/fruit/nightweave.dmi create mode 100644 mods/pyrelight/icons/plants/debug.dmi create mode 100644 mods/pyrelight/plants/_plants.dm create mode 100644 mods/pyrelight/plants/_plants.dme create mode 100644 mods/pyrelight/plants/_plot.dm create mode 100644 mods/pyrelight/plants/_subsystem.dm create mode 100644 mods/pyrelight/plants/fruit_subtypes/nightweave.dm create mode 100644 mods/pyrelight/plants/plant_subtypes/nightweave.dm create mode 100644 mods/pyrelight/plants/plants_fruit.dm create mode 100644 mods/pyrelight/plants/plants_fruit_segment.dm create mode 100644 mods/pyrelight/plants/plants_fruit_template.dm diff --git a/maps/modpack_testing/modpack_testing.dm b/maps/modpack_testing/modpack_testing.dm index 45e81695cdd..e8ccb22b668 100644 --- a/maps/modpack_testing/modpack_testing.dm +++ b/maps/modpack_testing/modpack_testing.dm @@ -24,6 +24,7 @@ #include "../../mods/content/pheromones/_pheromones.dme" #include "../../mods/species/drakes/_drakes.dme" // include before _fantasy.dme so overrides work #include "../../mods/content/fantasy/_fantasy.dme" + #include "../../mods/pyrelight/_pyrelight.dme" // include after _fantasy.dme so overrides work #include "../../mods/mobs/dionaea/_dionaea.dme" #include "../../mods/mobs/borers/_borers.dme" diff --git a/maps/shaded_hills/shaded_hills.dm b/maps/shaded_hills/shaded_hills.dm index 25767113d6a..eb99abfa669 100644 --- a/maps/shaded_hills/shaded_hills.dm +++ b/maps/shaded_hills/shaded_hills.dm @@ -5,6 +5,7 @@ #include "../../mods/content/scaling_descriptors.dm" #include "../../mods/species/drakes/_drakes.dme" // include before _fantasy.dme so overrides work #include "../../mods/content/fantasy/_fantasy.dme" + #include "../../mods/pyrelight/_pyrelight.dme" // include after _fantasy.dme so overrides work #include "_shaded_hills_defines.dm" diff --git a/mods/pyrelight/_pyrelight.dm b/mods/pyrelight/_pyrelight.dm new file mode 100644 index 00000000000..e8debbee975 --- /dev/null +++ b/mods/pyrelight/_pyrelight.dm @@ -0,0 +1,2 @@ +/decl/modpack/pyrelight + name = "Pyrelight Keep Content" diff --git a/mods/pyrelight/_pyrelight.dme b/mods/pyrelight/_pyrelight.dme new file mode 100644 index 00000000000..9f659ee0740 --- /dev/null +++ b/mods/pyrelight/_pyrelight.dme @@ -0,0 +1,9 @@ +#ifndef MODPACK_PYRELIGHT +#define MODPACK_PYRELIGHT +#include "_pyrelight.dm" +#include "datum/culture.dm" +#include "datum/factions.dm" +#include "datum/locations.dm" +#include "datum/religions.dm" +#include "plants/_plants.dme" +#endif \ No newline at end of file diff --git a/mods/pyrelight/datum/culture.dm b/mods/pyrelight/datum/culture.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mods/pyrelight/datum/factions.dm b/mods/pyrelight/datum/factions.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mods/pyrelight/datum/locations.dm b/mods/pyrelight/datum/locations.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mods/pyrelight/datum/religions.dm b/mods/pyrelight/datum/religions.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mods/pyrelight/icons/fruit/debug.dmi b/mods/pyrelight/icons/fruit/debug.dmi new file mode 100644 index 0000000000000000000000000000000000000000..28d90c7ee0c0482836e7400bc5dd74ae26cd1c89 GIT binary patch literal 256 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnH3?%tPCZz)@o&cW^*8>L*7#lOpG-fz6lfk8W zUkOm0u_VYZn8D%MjWi%9qbek##3i*jxhS)sBr`vcfuUkfa9BZ6>GvS zI(O!L@P<%>i^dNg>74h`Jjqbh)4RjMILP?2v6sS}N0W|B3Q-8w)ZAzh+SzTax_O1f z3DYN!e6+pJ__l7CDjM@Q=D;#02GKsrWx)#OGk|vLdAc};NK8#mSfHBFVt7Ml0nbJT z4drUi5YKzTD<<9DEfe7SAWLA^gJ%bPml-lJ^yRbP(RShod5OW()z4*}Q$iB}=4@Kq literal 0 HcmV?d00001 diff --git a/mods/pyrelight/icons/fruit/nightweave.dmi b/mods/pyrelight/icons/fruit/nightweave.dmi new file mode 100644 index 0000000000000000000000000000000000000000..2945fe31a83da1d33826699a39be65d8385250ab GIT binary patch literal 588 zcmV-S0<-;zP)S9p|7OhpGt5d= zG4KEY00DGTPE!Ct=GbNc005wRR9JLGWpiV4X>fFDZ*Bkpc$`yKaB_9`^iy#0_2eo` zEh^5;&r`5fFwryM;w;ZhDainGjE%TBGg33tGfE(w;*!LYR3K9+DX}JMJos@ zhRyx|&kl(%%b;Dtpjmd0Z#;MpZ6SdO006)%lXkw*HJFk>Uju6`mv78$y4Jv2#~7sj z&*|f8;JxP)7D2!{R~5+npV=CCzwidj!W*oPkDx z{`Y_+(ETP91-hf14*&oF0PyduD{Y%*d=}7CP!_A@u>FvtQz#x)=t^n1KApigX0002sr-)HI zUsoVTU4y7Cpw2DxwtUZwGbjttL60#8h1Hy&1jZN?1ycSgFv6hBaS5mys0+}r82|u) akvsu;>Is#_$D1ht0000E5Sad{Xb7OL8aCB*J zZU6vyoKseCa&`CgQ*iP1R9J=WR9kM`FbrJ5$iJx@ zNGC8L-9S1(f07$C_dh~8)WbB_*~SHm1==N=6cce|l0(hy_KH{hdC=v`J_!whp1%uGBkK-0wQZIPzEzsWd`IuZg4};LBgs;qer>Kt59iMg>23AAjoSort z9yx<%g&pq%8Gs@PR)mg2ct{8qN59uiYGCLYcyu_iS2NWE!1u77b8!aNGxb63mGi6> z>$@7PMRSMEWpr5OhA%z3XNN5|{U#qRuByi+rL^(S*ZKUsWcR4&=aN#cMSn@pOoYYr z>QXPYR=%Hqm2JONZ@Mfe3)>f*2_@B%D?T!ESoXPlx3&f$j2DrSol4P!h`QIEAXpJ9 z`j`YlMRDI13In&+5-O@Sr_@Hp*UO`2XXrLDG2t5vm&1M6Tym0cj7L6d));?5MF{lJ z2~x2l?6?u615IF`;&q2Pkj3o_xs(bH7bhZw?*Gj?4|s*rMQ+dhU)n^3qyJmHaIa`V z^cJm^|BK!h=hk$E)LZZJ;Qtn9$!!50tp8h_Fn$plOLg!67BA2^W1G+l*JSJXS-*5FL#FTf9JGS?)HZd;hms@_C=Qv`IMlzs1-gk(yuK zc*F<)w|MCU9@Dnlgz|rj#Wr}L{D6kZ82`68$r|OFhRs<2w|HTTDR|Si%N|LybVa|jO#Jw19_p%3Efu>ZAqd%sBd_`Eo=zfZW_!~Y(?0ENK73T~F{ Q2LJ#707*qoM6N<$f|J{x>Hq)$ literal 0 HcmV?d00001 diff --git a/mods/pyrelight/plants/_plants.dm b/mods/pyrelight/plants/_plants.dm new file mode 100644 index 00000000000..001cb531a86 --- /dev/null +++ b/mods/pyrelight/plants/_plants.dm @@ -0,0 +1,111 @@ +/obj/structure/flora/growing + name = "plant" + desc = "A plant of some kind." + icon = 'mods/pyrelight/icons/plants/debug.dmi' + icon_state = "1" + is_spawnable_type = FALSE + material = /decl/material/solid/organic/plantmatter + + // State tracking vars. + var/dead = FALSE + var/frozen = FALSE + var/last_tick + var/amount_grown = 0 + var/harvest_timer = 0 + var/growth_stage = 1 + var/list/fruits + var/max_fruits = 3 + + // Customization vars for use on subtypes. + var/time_per_growth_stage = 5 SECONDS + var/max_growth_stage = 5 + var/harvest_time = 5 SECONDS + var/harvest_tool + +/obj/structure/flora/growing/Initialize(ml, _mat, _reinf_mat) + . = ..() + START_PROCESSING(SSpyrelight_plants, src) + +/obj/structure/flora/growing/Destroy() + STOP_PROCESSING(SSpyrelight_plants, src) + return ..() + +/obj/structure/flora/growing/init_appearance() + update_icon() + +/obj/structure/flora/growing/Process() + + ..() + if(frozen || dead || last_tick == null) + last_tick = world.time + return + + var/time_elapsed = world.time - last_tick + last_tick = world.time + if(growth_stage < max_growth_stage) + amount_grown += time_elapsed + while(amount_grown >= time_per_growth_stage && growth_stage < max_growth_stage) + advance_growth() + amount_grown -= time_per_growth_stage + else if(length(fruits) < max_fruits) + harvest_timer += time_elapsed + while(harvest_timer >= harvest_time && length(fruits) < max_fruits) + add_fruit() + harvest_timer -= harvest_time + +/obj/structure/flora/growing/attackby(obj/item/O, mob/user) + if(user.a_intent == I_HELP) + if(!harvest_tool) + to_chat(user, "You must use your hands to harvest from \the [src].") + return TRUE + if(!O.get_tool_quality(harvest_tool)) + var/decl/tool_archetype/tool = GET_DECL(harvest_tool) + to_chat(user, SPAN_WARNING("You must use \a [tool] to harvest from \the [src].")) + return TRUE + harvest(user) + return TRUE + return ..() + +/obj/structure/flora/growing/attack_hand(mob/user) + if(user.a_intent == I_HELP) + if(harvest_tool) + var/decl/tool_archetype/tool = GET_DECL(harvest_tool) + to_chat(user, SPAN_WARNING("You must use \a [tool] to harvest from \the [src].")) + else + harvest(user) + return TRUE + return ..() + +/obj/structure/flora/growing/proc/harvest(var/mob/user) + if(length(fruits)) + var/obj/item/harvest = fruits[1] + harvest.dropInto(get_turf(src)) + to_chat(user, SPAN_NOTICE("You harvest \a [harvest] from \the [src].")) + user.put_in_hands(harvest) + fruits -= harvest + update_icon() + else + to_chat(user, SPAN_WARNING("There is nothing to harvest on \the [src].")) + +/obj/structure/flora/growing/proc/get_possible_fruits() + return + +/obj/structure/flora/growing/proc/add_fruit() + var/list/possible_fruits = get_possible_fruits() + if(length(possible_fruits)) + LAZYADD(fruits, pick(possible_fruits)) + update_icon() + +/obj/structure/flora/growing/proc/advance_growth() + growth_stage++ + update_icon() + +/obj/structure/flora/growing/on_update_icon() + . = ..() + cut_overlays() + if(dead) + icon_state = "dead" + else + icon_state = num2text(growth_stage) + for(var/i in 1 to length(fruits)) + add_overlay("fruit[i]") diff --git a/mods/pyrelight/plants/_plants.dme b/mods/pyrelight/plants/_plants.dme new file mode 100644 index 00000000000..3ae0ba589bc --- /dev/null +++ b/mods/pyrelight/plants/_plants.dme @@ -0,0 +1,8 @@ +#include "_plants.dm" +#include "_plot.dm" +#include "_subsystem.dm" +#include "fruit_subtypes/nightweave.dm" +#include "plants_fruit_segment.dm" +#include "plants_fruit_template.dm" +#include "plants_fruit.dm" +#include "plant_subtypes/nightweave.dm" diff --git a/mods/pyrelight/plants/_plot.dm b/mods/pyrelight/plants/_plot.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mods/pyrelight/plants/_subsystem.dm b/mods/pyrelight/plants/_subsystem.dm new file mode 100644 index 00000000000..2775b15e19e --- /dev/null +++ b/mods/pyrelight/plants/_subsystem.dm @@ -0,0 +1,4 @@ +PROCESSING_SUBSYSTEM_DEF(pyrelight_plants) + name = "Pyrelight Plants" + priority = SS_PRIORITY_PLANTS + wait = 5 SECONDS diff --git a/mods/pyrelight/plants/fruit_subtypes/nightweave.dm b/mods/pyrelight/plants/fruit_subtypes/nightweave.dm new file mode 100644 index 00000000000..86965faab79 --- /dev/null +++ b/mods/pyrelight/plants/fruit_subtypes/nightweave.dm @@ -0,0 +1,39 @@ +/obj/item/chems/food/fruit/flower_nightweave + name = "nightweave flower" + desc = "A night-blooming flower found in damp places, such as cavern entrances or along the shoreline." + examine_info = "The bioluminescent petals are extremely poisonous, and the stamen and stigma can be used to brew potent sedatives." + icon = 'mods/pyrelight/icons/fruit/nightweave.dmi' + is_spawnable_type = TRUE + +/obj/item/chems/food/fruit/flower_nightweave/get_composition() + var/static/list/composition = list( + new /datum/fruit_segment/petal( + "nightweave petal", + "A faintly glowing petal from a nightweave flower.", + 3, + list( + /decl/material/liquid/cyanide = 1 + ), + "Nightweave petals are exceptionally poisonous, attacking the heart and killing in minutes." + ), + new /datum/fruit_segment/stamen( + "nightweave stamen", + "A pollen-laden stamen from a nightweave flower.", + 2, + list( + /decl/material/liquid/sedatives = 2 + ), + "Nightweave pollen is known for its sedative effects, which can be delivered via a pill, in tea, or as snuff." + ), + new /datum/fruit_segment/stigma( + "nightweave stigma", + "A tiny, delicate stigma harvested from a nightweave flower.", + 1, + list( + /decl/material/liquid/paralytics = 3 + ), + "The stigma of the nightweave flower is exceptionally difficult to remove intact, but can be refined into a potent paralytic.", + SKILL_EXPERT + ) + ) + return composition diff --git a/mods/pyrelight/plants/plant_subtypes/nightweave.dm b/mods/pyrelight/plants/plant_subtypes/nightweave.dm new file mode 100644 index 00000000000..5bc971f98b4 --- /dev/null +++ b/mods/pyrelight/plants/plant_subtypes/nightweave.dm @@ -0,0 +1,7 @@ +/obj/structure/flora/growing/nightweave + name = "nightweave" + is_spawnable_type = TRUE + +/obj/structure/flora/growing/nightweave/get_possible_fruits() + var/static/list/possible_fruits = list(/obj/item/chems/food/fruit/flower_nightweave) + return possible_fruits diff --git a/mods/pyrelight/plants/plants_fruit.dm b/mods/pyrelight/plants/plants_fruit.dm new file mode 100644 index 00000000000..cdd0fb7b4e4 --- /dev/null +++ b/mods/pyrelight/plants/plants_fruit.dm @@ -0,0 +1,110 @@ +/obj/item/chems/food/fruit + name = "abstract fruit" + desc = "A mysterious fruit of some kind." + icon = 'mods/pyrelight/icons/fruit/debug.dmi' + icon_state = "base" + material = /decl/material/solid/organic/plantmatter + is_spawnable_type = FALSE + var/examine_info + var/examine_info_skill = SKILL_BOTANY + var/examine_info_rank = SKILL_BASIC + var/list/removed_segments + +/obj/item/chems/food/fruit/initialize_reagents(populate) + var/segment_amount = 0 + for(var/datum/fruit_segment/comp as anything in get_composition()) + if(comp.contributes_to_fruit_reagents) + segment_amount += comp.reagent_total + create_reagents(segment_amount) + return ..() + +/obj/item/chems/food/fruit/populate_reagents() + for(var/datum/fruit_segment/comp as anything in get_composition()) + if(!comp.contributes_to_fruit_reagents) + continue + for(var/rid in comp.reagents) + reagents.add_reagent(rid, comp.reagents[rid]) + return ..() + +/obj/item/chems/food/fruit/Destroy() + removed_segments = null + return ..() + +/obj/item/chems/food/fruit/on_update_icon() + . = ..() + var/list/comp_count = list() + for(var/datum/fruit_segment/comp as anything in get_composition()) + if(!comp.contributes_to_fruit_icon) + continue + var/remaining = comp.dissect_amount - LAZYACCESS(removed_segments, comp) + if(remaining > 0) + for(var/i = 1 to remaining) + add_overlay(image(icon, "[comp.icon_state][++comp_count[comp.name]]")) + +/obj/item/chems/food/fruit/examine(mob/user, distance) + . = ..() + if(distance > 1) + return + + if(examine_info && (!examine_info_skill || !examine_info_rank || user.skill_check(examine_info_skill, examine_info_rank))) + to_chat(user, examine_info) + + var/list/fruit_comp_strings = list() + for(var/datum/fruit_segment/comp as anything in get_composition()) + var/remaining = comp.dissect_amount - LAZYACCESS(removed_segments, comp) + if(remaining <= 0) + continue + if(!comp.dissect_skill || !comp.dissect_skill_requirement || user.skill_check(comp.dissect_skill, comp.dissect_skill_requirement)) + var/decl/tool_archetype/tool = comp.dissect_tool && GET_DECL(comp.dissect_tool) + var/comp_string_index = tool?.name ? ADD_ARTICLE(tool.name) : "your hands" + LAZYINITLIST(fruit_comp_strings[comp_string_index]) + fruit_comp_strings[comp_string_index][comp.name] += comp.dissect_amount + + for(var/comp_ind in fruit_comp_strings) + var/list/comp_string_comps = list() + for(var/comp_string in fruit_comp_strings[comp_ind]) + comp_string_comps += "[fruit_comp_strings[comp_ind][comp_string]] [comp_string]\s" + if(length(comp_string_comps)) + to_chat(user, SPAN_NOTICE("With [comp_ind], you could harvest [english_list(comp_string_comps)].")) + +/obj/item/chems/food/fruit/attackby(obj/item/W, mob/living/user) + if(user?.a_intent != I_HURT) + var/list/fruit_comp = get_composition() + for(var/datum/fruit_segment/comp as anything in fruit_comp) + var/remaining = comp.dissect_amount - LAZYACCESS(removed_segments, comp) + if(remaining <= 0 || !comp.dissect_tool || !W.get_tool_quality(comp.dissect_tool)) + continue + comp.on_harvest(W, user, src) + return TRUE + return ..() + +/obj/item/chems/food/fruit/attack_self(mob/user) + var/list/fruit_comp = get_composition() + for(var/datum/fruit_segment/comp as anything in fruit_comp) + var/remaining = comp.dissect_amount - LAZYACCESS(removed_segments, comp) + if(remaining <= 0 || comp.dissect_tool) + continue + if(!comp.dissect_skill || !comp.dissect_skill_requirement || user.skill_check(comp.dissect_skill, comp.dissect_skill_requirement)) + comp.on_harvest(null, user, src) + return TRUE + return ..() + +/obj/item/chems/food/fruit/proc/get_composition() + return + +/obj/item/chems/food/fruit/proc/remove_segment(var/datum/fruit_segment/remove_comp) + + LAZYINITLIST(removed_segments) + removed_segments[remove_comp]++ + if(reagents?.total_volume && remove_comp.contributes_to_fruit_reagents) + for(var/rid in remove_comp.reagents) + reagents.remove_reagent(rid, remove_comp.reagents[rid]) + + var/list/fruit_comp = get_composition() + for(var/datum/fruit_segment/comp as anything in fruit_comp) + var/remaining = comp.dissect_amount - LAZYACCESS(removed_segments, comp) + if(remaining > 0) + update_icon() + return + + qdel(src) diff --git a/mods/pyrelight/plants/plants_fruit_segment.dm b/mods/pyrelight/plants/plants_fruit_segment.dm new file mode 100644 index 00000000000..099db79dacd --- /dev/null +++ b/mods/pyrelight/plants/plants_fruit_segment.dm @@ -0,0 +1,34 @@ +/obj/item/chems/food/fruit_segment + name = "abstract fruit segment" + is_spawnable_type = FALSE + material = /decl/material/solid/organic/plantmatter + var/datum/fruit_segment/fruit_template + +/obj/item/chems/food/fruit_segment/Destroy() + . = ..() + fruit_template = null + +/obj/item/chems/food/fruit_segment/Initialize(ml, material_key, datum/fruit_segment/_template, obj/item/_fruit) + if(!_template) + PRINT_STACK_TRACE("Fruit segment created with no template datum.") + return INITIALIZE_HINT_QDEL + name = _template.name + desc = _template.desc + icon = _fruit.icon + icon_state = "seg_[_template.icon_state]" + fruit_template = _template + return ..() + +/obj/item/chems/food/fruit_segment/initialize_reagents(populate) + create_reagents(fruit_template.reagent_total) + return ..() + +/obj/item/chems/food/fruit_segment/populate_reagents() + for(var/rid in fruit_template.reagents) + reagents.add_reagent(rid, fruit_template.reagents[rid]) + return ..() + +/obj/item/chems/food/fruit_segment/examine(mob/user, distance) + . = ..() + if(distance <= 1 && fruit_template.examine_info && (!fruit_template.examine_info_skill || !fruit_template.examine_info_rank || user.skill_check(fruit_template.examine_info_skill, fruit_template.examine_info_rank))) + to_chat(user, fruit_template.examine_info) diff --git a/mods/pyrelight/plants/plants_fruit_template.dm b/mods/pyrelight/plants/plants_fruit_template.dm new file mode 100644 index 00000000000..3f49cbf8455 --- /dev/null +++ b/mods/pyrelight/plants/plants_fruit_template.dm @@ -0,0 +1,66 @@ +/datum/fruit_segment + var/name + var/desc + var/object_type = /obj/item/chems/food/fruit_segment + var/reagent_total + var/list/reagents + var/icon_state + + var/contributes_to_fruit_icon = TRUE + var/contributes_to_fruit_reagents = TRUE + + var/examine_info + var/examine_info_skill = SKILL_BOTANY + var/examine_info_rank = SKILL_BASIC + + var/dissect_amount = 1 + var/dissect_tool = TOOL_SCALPEL + var/dissect_skill = SKILL_BOTANY + var/dissect_skill_requirement = SKILL_ADEPT + +/datum/fruit_segment/New(var/_name, var/_desc, var/_amt, var/_reagents, var/_examine_info, var/_examine_skill_rank, var/_examine_skill) + if(_name) + name = _name + if(_desc) + desc = _desc + if(_reagents) + reagents = _reagents + if(_examine_info) + examine_info = _examine_info + if(_examine_skill_rank) + examine_info_rank = _examine_skill_rank + if(_examine_skill) + examine_info_skill = _examine_skill + dissect_amount = _amt + reagents = _reagents + reagent_total = 0 + if(length(reagents)) + for(var/rid in reagents) + reagent_total += reagents[rid] + ..() + +/datum/fruit_segment/proc/can_harvest_with(var/obj/item/prop, var/mob/user) + return FALSE + +/datum/fruit_segment/proc/on_harvest(var/obj/item/prop, var/mob/user, var/obj/item/chems/food/fruit/fruit) + if(!object_type) + return FALSE + var/obj/item/product = new object_type(get_turf(fruit), prop?.material?.type, src, fruit) + user.put_in_hands(product) + to_chat(user, SPAN_NOTICE("You remove \a [product] from \the [fruit][prop ? "with \the [prop]" : ""].")) + fruit.remove_segment(src) + return TRUE + +/datum/fruit_segment/proc/apply_fruit_appearance(var/obj/item/chems/food/fruit/fruit, var/count = 0) + return + +/datum/fruit_segment/petal + icon_state = "petal" + dissect_tool = null + +/datum/fruit_segment/stamen + icon_state = "stamen" + +/datum/fruit_segment/stigma + icon_state = "stigma" + contributes_to_fruit_reagents = FALSE