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
This commit is contained in:
d_h2005@yahoo.com
2012-08-28 03:17:13 +00:00
parent b0f750339c
commit a3ca5e7ded
5 changed files with 26 additions and 21 deletions
+14 -8
View File
@@ -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)
..()
@@ -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()