diff --git a/code/datums/chemistry/tools/balloons.dm b/code/datums/chemistry/tools/balloons.dm index 7dd27dfb..22949ad2 100644 --- a/code/datums/chemistry/tools/balloons.dm +++ b/code/datums/chemistry/tools/balloons.dm @@ -35,7 +35,7 @@ proc/update_icon() if (src.reagents && src.reagents.total_volume > 0) - if (src.reagents.has_reagent("helium")) + if (src.reagents.has_reagent("helium") || src.reagents.has_reagent("hydrogen")) src.icon_state = "balloon_[src.balloon_color]_inflated" src.item_state = "balloon_[src.balloon_color]_inflated" else @@ -50,7 +50,7 @@ if (!src.reagents) return if (!ohshit) - ohshit = (src.reagents.total_volume / 30) * 33 + ohshit = (src.reagents.total_volume / (src.reagents.maximum_volume - 10)) * 33 if (prob(ohshit)) smash() if (user) diff --git a/code/datums/hydroponics/plant_mutations.dm b/code/datums/hydroponics/plant_mutations.dm index 8ff4ca41..e24826de 100644 --- a/code/datums/hydroponics/plant_mutations.dm +++ b/code/datums/hydroponics/plant_mutations.dm @@ -89,6 +89,43 @@ crop = /obj/item/reagent_containers/food/snacks/plant/melon/george assoc_reagents = list("george_melonium") +/datum/plantmutation/melon/balloon + name = "Balloon... Melons?" + crop = /obj/item/reagent_containers/balloon + iconmod = "balloon" + assoc_reagents = list("helium") + +/datum/plantmutation/melon/hindenballoon + name = "Balloon... Melons?" + crop = /obj/item/reagent_containers/balloon + iconmod = "balloon" + assoc_reagents = list("hydrogen") + +/datum/plantmutation/melon/bowling + name = "Bowling Melons" + crop = /obj/item/reagent_containers/food/snacks/plant/melon/bowling + ENrange = list(20,null) + chance = 20 + special_proc_override = 1 + + HYPspecial_proc_M(var/obj/machinery/plantpot/POT) + ..() + if (.) return + var/datum/plantgenes/DNA = POT.plantgenes + + var/thud_prob = max(0,min(100, DNA.endurance / 2)) + + if (prob(thud_prob)) + playsound(POT.loc, "sound/effects/exlow.ogg", 30, 1) + var/wiggle = 4 + while(wiggle > 0) + wiggle-- + POT.pixel_x = rand(-2,2) + POT.pixel_y = rand(-2,2) + sleep(1) + POT.pixel_x = 0 + POT.pixel_y = 0 + // Chili Mutations /datum/plantmutation/chili/chilly @@ -351,4 +388,4 @@ name = "Money Tree" iconmod = "Cash" crop = /obj/item/spacecash - chance = 20 \ No newline at end of file + chance = 20 diff --git a/code/datums/hydroponics/plants_fruit.dm b/code/datums/hydroponics/plants_fruit.dm index 4e260f53..0f68ce34 100644 --- a/code/datums/hydroponics/plants_fruit.dm +++ b/code/datums/hydroponics/plants_fruit.dm @@ -73,8 +73,21 @@ genome = 19 assoc_reagents = list("water") nectarlevel = 15 - mutations = list(/datum/plantmutation/melon/george) + mutations = list(/datum/plantmutation/melon/george, /datum/plantmutation/melon/bowling) commuts = list(/datum/plant_gene_strain/immortal,/datum/plant_gene_strain/seedless) + special_proc = 1 // my sincerest apologies for this, it's there only for a dumb effect on the bowling melons + + HYPinfusionP(var/obj/item/seed/S,var/reagent) + ..() + var/datum/plantgenes/DNA = S.plantgenes + if (!DNA) return + switch(reagent) + if("helium") + if (prob(50)) + DNA.mutation = HY_get_mutation_from_path(/datum/plantmutation/melon/balloon) + if("hydrogen") + if (prob(50)) + DNA.mutation = HY_get_mutation_from_path(/datum/plantmutation/melon/hindenballoon) /datum/plant/chili name = "Chili" @@ -231,4 +244,4 @@ endurance = 1 genome = 18 nectarlevel = 10 - assoc_reagents = list("juice_strawberry") \ No newline at end of file + assoc_reagents = list("juice_strawberry") diff --git a/code/obj/item/food/plants.dm b/code/obj/item/food/plants.dm index a95effd2..00df032b 100644 --- a/code/obj/item/food/plants.dm +++ b/code/obj/item/food/plants.dm @@ -246,11 +246,20 @@ var/turf/T = get_turf(src) user.visible_message("[user] cuts [src] into slices.", "You cut [src] into slices.") var/makeslices = 6 + var/amount_per_slice = 0 + if(src.reagents) + amount_per_slice = src.reagents.total_volume / makeslices + src.reagents.inert = 1 while (makeslices > 0) var/obj/item/reagent_containers/food/snacks/plant/melonslice/P = new(T) var/datum/plantgenes/DNA = src.plantgenes var/datum/plantgenes/PDNA = P.plantgenes HYPpassplantgenes(DNA,PDNA) + if(src.reagents) + P.reagents = new + P.reagents.inert = 1 // no stacking of potassium + water explosions on cutting + src.reagents.trans_to(P, amount_per_slice) + P.reagents.inert = 0 makeslices -= 1 qdel (src) ..() @@ -284,11 +293,20 @@ var/turf/T = get_turf(src) user.visible_message("[user] cuts [src] into slices.", "You cut [src] into slices.") var/makeslices = 6 + var/amount_per_slice = 0 + if(src.reagents) + amount_per_slice = src.reagents.total_volume / makeslices + src.reagents.inert = 1 while (makeslices > 0) var/obj/item/reagent_containers/food/snacks/plant/melonslice/george/P = new(T) var/datum/plantgenes/DNA = src.plantgenes var/datum/plantgenes/PDNA = P.plantgenes HYPpassplantgenes(DNA,PDNA) + if(src.reagents) + P.reagents = new + P.reagents.inert = 1 // no stacking of potassium + water explosions on cutting + src.reagents.trans_to(P, amount_per_slice) + P.reagents.inert = 0 makeslices -= 1 qdel (src) ..() @@ -319,7 +337,107 @@ New() ..() - reagents.add_reagent("george_melonium",25) + reagents.add_reagent("george_melonium",20) + + +/obj/item/reagent_containers/food/snacks/plant/melon/bowling + name = "bowling melon" + desc = "Just keep rollin' rollin'." + icon = 'icons/obj/items.dmi' + icon_state = "bowling_melon" + var/base_icon_state = "bowling_melon" + var/already_burst = 0 + w_class = 3.0 + force = 5 + throw_speed = 1 + + proc/damage(var/mob/hitMob, damMin, damMax, var/mob/living/carbon/human/user) + if(user.w_uniform && istype(user.w_uniform, /obj/item/clothing/under/gimmick/bowling)) + hitMob.weakened = max(damMax-10, hitMob.weakened) + hitMob.stuttering = max(damMax-5, hitMob.stuttering) + //hitMob.stunned = max(damMax-10, hitMob.stunned) // I'd rather just not have this be strictly better bowling balls? idk, uncomment if you want them to stun with the suit + hitMob.TakeDamage("chest", rand(damMin, damMax), 0) + else + // kyle wanted to add disorient here I think? + hitMob.stuttering = max(damMax-5, hitMob.stuttering) + hitMob.TakeDamage("chest", rand(damMin, damMax), 0) + + throw_at(atom/target, range, speed) + throw_unlimited = 1 + if(target.x > src.x || (target.x == src.x && target.y > src.y)) + src.icon_state = "[base_icon_state]_spin_right" + else + src.icon_state = "[base_icon_state]_spin_left" + ..(target, range, speed) + + attack_hand(mob/user as mob) + ..() + if(user) + src.icon_state = base_icon_state + + proc/hitWeak(var/mob/hitMob, var/mob/user) + hitMob.visible_message("[hitMob] is hit by [user]'s [src]!") + // look these numbers are pulled out of my ass, change them if things are too broken / too weak + var/dmg = min(12, src.plantgenes.endurance / 7) + src.damage(hitMob, dmg, dmg + 5, user) + + proc/hitHard(var/mob/hitMob, var/mob/user) + hitMob.visible_message("[hitMob] is knocked over by [user]'s [src]!") + var/dmg = min(20, src.plantgenes.endurance / 5 + 3) + src.damage(hitMob, dmg, dmg + 5, user) + + throw_impact(atom/hit_atom) + var/mob/living/carbon/human/user = usr + + if(hit_atom) + playsound(src.loc, "sound/effects/exlow.ogg", 65, 1) + if (ismob(hit_atom)) + var/mob/hitMob = hit_atom + if (ishuman(hitMob)) + spawn( 0 ) + if (istype(user)) + if (user.w_uniform && istype(user.w_uniform, /obj/item/clothing/under/gimmick/bowling)) + src.hitHard(hitMob, user) + + if(!(hitMob == user)) + user.say(pick("Who's the kingpin now, baby?", "STRIIIKE!", "Watch it, pinhead!", "Ten points!")) + else + src.hitWeak(hitMob, user) + else + src.hitWeak(hitMob, user) + if(already_burst) + return + already_burst = 1 + src.icon_state = "[base_icon_state]_burst" + sleep(1) + var/n_slices = rand(1, 5) + var/amount_per_slice = 0 + if(src.reagents) + amount_per_slice = src.reagents.total_volume / 5 + src.reagents.inert = 1 + while(n_slices) + var/obj/item/reagent_containers/food/snacks/plant/melonslice/slice = new(get_turf(src)) + if(src.reagents) + slice.reagents = new + // temporary inert is here so this doesn't hit people with 5 potassium + water explosions at once + slice.reagents.inert = 1 + src.reagents.trans_to(slice, amount_per_slice) + slice.reagents.inert = 0 + var/datum/plantgenes/DNA = src.plantgenes + var/datum/plantgenes/PDNA = slice.plantgenes + HYPpassplantgenes(DNA,PDNA) + if(istype(hit_atom, /mob/living) && prob(1)) + var/mob/living/dork = hit_atom + boutput(slice, "A melon slice hits [dork] right in the mouth!") + slice.Eat(dork, dork) + else + var/target = get_turf(pick(orange(4, src))) + spawn(0) + slice.throw_at(target, rand(0, 10), range(1, 4)) + n_slices-- + sleep(1) + qdel(src) + return /obj/item/reagent_containers/food/snacks/plant/chili/ diff --git a/code/obj/machinery/plantpot.dm b/code/obj/machinery/plantpot.dm index 8597f093..8cdff262 100644 --- a/code/obj/machinery/plantpot.dm +++ b/code/obj/machinery/plantpot.dm @@ -643,10 +643,10 @@ UpdateOverlays(null, "health_display") var/planticon = null - if (growing.sprite) - planticon = "[growing.sprite]-G[src.grow_level]" - else if (MUT && MUT.iconmod) + if (MUT && MUT.iconmod) planticon = "[MUT.iconmod]-G[src.grow_level]" + else if (growing.sprite) + planticon = "[growing.sprite]-G[src.grow_level]" else if (growing.special_icon) planticon = "[growing.special_icon]-G[src.grow_level]" else @@ -965,6 +965,11 @@ var/obj/item/organ/heart/H = CROP H.quality = quality_score + else if (istype(CROP,/obj/item/reagent_containers/balloon)) + var/obj/item/reagent_containers/balloon/B = CROP + B.reagents.maximum_volume = B.reagents.maximum_volume + DNA.endurance // more endurance = larger and more sturdy balloons! + HYPadd_harvest_reagents(CROP,growing,DNA,quality_status) + if (((growing.isgrass || growing.force_seed_on_harvest) && prob(80)) && !istype(CROP,/obj/item/seed/) && !HYPCheckCommut(DNA,/datum/plant_gene_strain/seedless)) // Same shit again. This isn't so much the crop as it is giving you seeds // incase you couldn't get them otherwise, though. @@ -1232,7 +1237,8 @@ proc/HYPadd_harvest_reagents(var/obj/item/I,var/datum/plant/growing,var/datum/pl if (special_condition == "jumbo") basecapacity *= 2 - I.reagents.maximum_volume = basecapacity + DNA.potency + var/to_add = basecapacity + DNA.potency + I.reagents.maximum_volume = max(basecapacity + DNA.potency, I.reagents.maximum_volume) if (I.reagents.maximum_volume < 1) I.reagents.maximum_volume = 1 // Now we add the plant's potency to their max reagent capacity. If this causes it to fall @@ -1251,7 +1257,7 @@ proc/HYPadd_harvest_reagents(var/obj/item/I,var/datum/plant/growing,var/datum/pl putreagents |= R.reagents_to_add if (putreagents.len && I.reagents.maximum_volume) - var/putamount = round(I.reagents.maximum_volume / putreagents.len) + var/putamount = round(to_add / putreagents.len) for(var/X in putreagents) I.reagents.add_reagent(X,putamount,,, 1) // And finally put them in there. We figure out the max volume and add an even amount of diff --git a/code/obj/submachine/seed.dm b/code/obj/submachine/seed.dm index a5c9bee1..7a7b3fc9 100644 --- a/code/obj/submachine/seed.dm +++ b/code/obj/submachine/seed.dm @@ -371,18 +371,6 @@ // Cap probability between 0 and 100 splice_chance = max(0,min(splice_chance,100)) if (prob(splice_chance)) // We're good, so start splicing! - // Create the new seed - var/obj/item/seed/S = new /obj/item/seed(src) - var/datum/plant/P = new /datum/plant(S) - var/datum/plantgenes/DNA = new /datum/plantgenes(S) - S.planttype = P - S.plantgenes = DNA - P.hybrid = 1 - if (seed1.generation > seed2.generation) - S.generation = seed1.generation + 1 - else - S.generation = seed2.generation + 2 - var/datum/plantgenes/P1DNA = seed1.plantgenes var/datum/plantgenes/P2DNA = seed2.plantgenes @@ -405,6 +393,18 @@ else dominantspecies = P2 dominantDNA = P2DNA + // Create the new seed + var/obj/item/seed/S = new /obj/item/seed(src) + var/datum/plant/P = new dominantspecies.type(S) + var/datum/plantgenes/DNA = new /datum/plantgenes(S) + S.planttype = P + S.plantgenes = DNA + P.hybrid = 1 + if (seed1.generation > seed2.generation) + S.generation = seed1.generation + 1 + else + S.generation = seed2.generation + 2 + // Set up the base variables first if (!dominantspecies.hybrid) @@ -1120,4 +1120,4 @@ else src.malfunction = 1 if (WIRE_POWER) if (src.working) src.working = 0 - else src.working = 1 \ No newline at end of file + else src.working = 1 diff --git a/icons/obj/hydroponics/hydro_mutants.dmi b/icons/obj/hydroponics/hydro_mutants.dmi index b517eadd..6afc3a6b 100644 Binary files a/icons/obj/hydroponics/hydro_mutants.dmi and b/icons/obj/hydroponics/hydro_mutants.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index 9f407740..e9b3b96e 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ