Adds a Minecraft reference to eggs (#45912)

* Update heal.dm

* Update heal.dm

* Update snacks_egg.dm

* Update snacks_egg.dm
This commit is contained in:
ATH1909
2019-08-20 00:57:17 -05:00
committed by Rob Bailey
parent a0e993dea8
commit 134094de67

View File

@@ -20,6 +20,7 @@
filling_color = "#F0E68C"
foodtype = MEAT
grind_results = list()
var/static/chick_count = 0 //I copied this from the chicken_count (note the "en" in there) variable from chicken code.
/obj/item/reagent_containers/food/snacks/egg/gland
desc = "An egg! It looks weird..."
@@ -34,7 +35,11 @@
/obj/item/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..()) //was it caught by a mob?
var/turf/T = get_turf(hit_atom)
new/obj/effect/decal/cleanable/food/egg_smudge(T)
new /obj/effect/decal/cleanable/food/egg_smudge(T)
if(prob(13)) //Roughly a 1/8 (12.5%) chance to make a chick, as in Minecraft. I decided not to include the chances for the creation of multiple chicks from the impact of one egg, since that'd probably require nested prob()s or something (and people might think that it was a bug, anyway).
if(chick_count < MAX_CHICKENS) //Chicken code uses this MAX_CHICKENS variable, so I figured that I'd use it again here. Even this check and the check in chicken code both use the MAX_CHICKENS variable, they use independent counter variables and thus are independent of each other.
new /mob/living/simple_animal/chick(T)
chick_count++
reagents.reaction(hit_atom, TOUCH)
qdel(src)