From a3ca5e7dedc9e6b57400a9bd77263fe170f1d5dd Mon Sep 17 00:00:00 2001 From: "d_h2005@yahoo.com" Date: Tue, 28 Aug 2012 03:17:13 +0000 Subject: [PATCH] The yield mode on the somatoray gun now uses a diminishing-returns formula to determine the chance of increasing yield (instead of a hard cap at 2)! Cleaned up somatoray code a bit too. Doctor's Delight, the miracle drug, now requires tricordrazine to brew. Fixes Issue 858. The text is now gender sensitive. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4571 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/hydroponics.dm | 22 ++++++++++++------- .../objects/structures/stool_chair_bed.dm | 4 ++-- code/modules/mob/mob_grab.dm | 12 +++++----- .../modules/projectiles/projectile/special.dm | 5 ++--- code/modules/reagents/Chemistry-Recipes.dm | 4 ++-- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm index 7109f932aa..830ffd47ab 100644 --- a/code/game/machinery/hydroponics.dm +++ b/code/game/machinery/hydroponics.dm @@ -20,15 +20,21 @@ var/planted = 0 // Is it occupied? var/harvest = 0 //Ready to harvest? var/obj/item/seeds/myseed = null // The currently planted seed - New() + +/obj/machinery/hydroponics/bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables. + if(istype(Proj ,/obj/item/projectile/energy/floramut)) + if(src.planted) + src.mutate() + else if(istype(Proj ,/obj/item/projectile/energy/florayield)) + if(src.planted && src.myseed.yield == 0)//Oh god don't divide by zero you'll doom us all. + src.myseed.yield += 1 + //world << "Yield increased by 1, from 0, to a total of [src.myseed.yield]" + else if (src.planted && (prob(1/(src.myseed.yield * src.myseed.yield) *100)))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2... + src.myseed.yield += 1 + //world << "Yield increased by 1, to a total of [src.myseed.yield]" + else ..() - bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables. - if(istype(Proj ,/obj/item/projectile/energy/floramut)) - if(src.planted) - src.mutate() - else if(istype(Proj ,/obj/item/projectile/energy/florayield)) - if(src.planted && src.myseed.yield < 2) - src.myseed.yield += 1 + return /obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob) ..() diff --git a/code/game/objects/structures/stool_chair_bed.dm b/code/game/objects/structures/stool_chair_bed.dm index 2ede6de660..9b089366db 100644 --- a/code/game/objects/structures/stool_chair_bed.dm +++ b/code/game/objects/structures/stool_chair_bed.dm @@ -69,11 +69,11 @@ if(buckled_mob != user) buckled_mob.visible_message(\ "\blue [buckled_mob.name] was unbuckled by [user.name]!",\ - "You unbuckled from [src] by [user.name].",\ + "You were unbuckled from [src] by [user.name].",\ "You hear metal clanking") else buckled_mob.visible_message(\ - "\blue [buckled_mob.name] unbuckled himself!",\ + "\blue [buckled_mob.name] unbuckled \himself!",\ "You unbuckle yourself from [src].",\ "You hear metal clanking") unbuckle() diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 22a0571c04..c7dee0e2c1 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -108,7 +108,7 @@ if ((killing == 2 && state == 3)) if(assailant.loc != kill_loc) for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] lost his tightened grip on []'s neck!", assailant, affecting), 1) + O.show_message(text("\red [] lost \his tightened grip on []'s neck!", assailant, affecting), 1) killing = 0 hud1.icon_state = "disarm/kill" return @@ -134,7 +134,7 @@ if (state >= 3) if (!( killing )) for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] has temporarily tightened his grip on []!", assailant, affecting), 1) + O.show_message(text("\red [] has temporarily tightened \his grip on []!", assailant, affecting), 1) //Foreach goto(97) assailant.next_move = world.time + 10 //affecting.stunned = max(2, affecting.stunned) @@ -198,7 +198,7 @@ return for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] has reinforced his grip on [] (now neck)!", assailant, affecting), 1) + O.show_message(text("\red [] has reinforced \his grip on [] (now neck)!", assailant, affecting), 1) state = 3 icon_state = "grabbed+1" @@ -212,7 +212,7 @@ else if (state >= 3 && !killing) for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] starts to tighten his grip on []'s neck!", assailant, affecting), 1) + O.show_message(text("\red [] starts to tighten \his grip on []'s neck!", assailant, affecting), 1) hud1.icon_state = "disarm/kill1" killing = 1 if(do_after(assailant, 50)) @@ -227,7 +227,7 @@ killing = 2 kill_loc = assailant.loc for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] has tightened his grip on []'s neck!", assailant, affecting), 1) + O.show_message(text("\red [] has tightened \his grip on []'s neck!", assailant, affecting), 1) affecting.attack_log += text("\[[time_stamp()]\] Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])") assailant.attack_log += text("\[[time_stamp()]\] Strangled (kill intent) [affecting.name] ([affecting.ckey])") log_attack("[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])") @@ -236,7 +236,7 @@ affecting.losebreath += 1 else for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] was unable to tighten his grip on []'s neck!", assailant, affecting), 1) + O.show_message(text("\red [] was unable to tighten \his grip on []'s neck!", assailant, affecting), 1) killing = 0 hud1.icon_state = "disarm/kill" return diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 5e12670cc2..7225b022cf 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -80,10 +80,9 @@ on_hit(var/atom/target, var/blocked = 0) var/mob/living/M = target if(ishuman(target) && M.dna && M.dna.mutantrace == "plant") //Plantmen possibly get mutated and damaged by the rays. - var/mob/living/L = target if(prob(15)) - L.apply_effect((rand(30,80)),IRRADIATE) - L.Weaken(5) + M.apply_effect((rand(30,80)),IRRADIATE) + M.Weaken(5) for (var/mob/V in viewers(src)) V.show_message("\red [M] writhes in pain as \his vacuoles boil.", 3, "\red You hear the crunching of leaves.", 2) if(prob(35)) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 770ae26640..a6c3b6a95a 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -1096,8 +1096,8 @@ datum name = "The Doctor's Delight" id = "doctordelight" result = "doctorsdelight" - required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 1) - result_amount = 4 + required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 1, "tricordrazine" = 1) + result_amount = 5 irish_cream name = "Irish Cream"