Merge pull request #1636 from DragonTrance/item-scaling-element

Hydroponics plants aren't tiny af when inside bags anymore (icky scaling) + adding storage enter/exit signals
This commit is contained in:
QuoteFox
2022-06-08 04:27:15 +01:00
committed by GitHub
5 changed files with 55 additions and 9 deletions
+8 -7
View File
@@ -33,6 +33,9 @@
// This is for adminspawn or map-placed growns. They get the default stats of their seed type.
seed = new seed()
seed.adjust_potency(50-seed.potency)
else if(!seed)
stack_trace("Grown initialized without seed. Okay.")
return INITIALIZE_HINT_QDEL
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
@@ -40,13 +43,11 @@
if(dried_type == -1)
dried_type = src.type
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
T.on_new(src, loc)
seed.prepare_result(src)
transform *= TRANSFORM_USING_VARIABLE(seed.potency, 100) + 0.5 //Makes the resulting produce's sprite larger or smaller based on potency!
add_juice()
for(var/datum/plant_gene/trait/T in seed.genes)
T.on_new(src, loc)
seed.prepare_result(src)
AddElement(/datum/element/item_scaling, TRANSFORM_USING_VARIABLE(seed.potency, 100) + 0.5, 1) //Makes the resulting produce's sprite larger or smaller based on potency!
add_juice()
/obj/item/reagent_containers/food/snacks/grown/proc/add_juice()