Skip to content

Commit

Permalink
error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben10083 committed Sep 15, 2024
1 parent 2671f9a commit e13b0dd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions code/modules/reagents/reagent_containers/food/snacks/eggs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
reagents_to_add = list(/singleton/reagent/nutriment/protein/egg = 3)
/// What can be hatched from this egg
var/hatchling = /mob/living/simple_animal/chick
/// Tracks how much the egg has grown. At 100, egg hatches
var/amount_grown = 0
/// If set to TRUE, egg is currently growing and will eventually spawn a hatchling if left alone on a turf.
/// Set to TRUE for eggs mapped in, but meant to be able to hatch.
var/fertile = FALSE

/obj/item/reagent_containers/food/snacks/egg/Initialize(mapload)
. = ..()
if(fertile)
egg.fertilize()
fertilize()

/obj/item/reagent_containers/food/snacks/egg/afterattack(obj/O as obj, mob/user as mob, proximity)
if(!(proximity && O.is_open_container()))
Expand Down Expand Up @@ -49,9 +51,6 @@
return TRUE
return ..()

/obj/item/reagent_containers/food/snacks/egg
var/amount_grown = 0

/// Call this proc to have the given egg start growing. Should only be called if hatching is set
/obj/item/reagent_containers/food/snacks/egg/proc/fertilize()
if(hatchling)
Expand Down

0 comments on commit e13b0dd

Please sign in to comment.