From ecf4515eaf73350e6f9637e13cdaaa6d6a85551d Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 27 Nov 2023 19:51:46 -0800 Subject: [PATCH] redo --- code/__DEFINES/layers.dm | 2 -- code/modules/cm_aliens/structures/egg.dm | 2 +- code/modules/mob/living/carbon/xenomorph/egg_item.dm | 6 ++++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index fb99f8da321b..c0ccd5164b0b 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -125,8 +125,6 @@ /// for xenos to hide behind bushes and tall grass #define ABOVE_XENO_LAYER 4.12 -/// For eggs so they can't hide below grass -#define EGG_LAYER 4.121 /// For facehuggers #define FACEHUGGER_LAYER 4.13 /// For WEATHER diff --git a/code/modules/cm_aliens/structures/egg.dm b/code/modules/cm_aliens/structures/egg.dm index 5a71e7ed4a10..770b31e1dbf6 100644 --- a/code/modules/cm_aliens/structures/egg.dm +++ b/code/modules/cm_aliens/structures/egg.dm @@ -8,7 +8,7 @@ icon_state = "Egg Growing" density = FALSE anchored = TRUE - layer = EGG_LAYER + layer = LYING_BETWEEN_MOB_LAYER health = 80 plane = GAME_PLANE var/list/egg_triggers = list() diff --git a/code/modules/mob/living/carbon/xenomorph/egg_item.dm b/code/modules/mob/living/carbon/xenomorph/egg_item.dm index 60f1202d1ab3..61d79d714a22 100644 --- a/code/modules/mob/living/carbon/xenomorph/egg_item.dm +++ b/code/modules/mob/living/carbon/xenomorph/egg_item.dm @@ -106,6 +106,12 @@ to_chat(user, SPAN_XENOWARNING("[src] cannot be planted inside a vehicle.")) return + for(var/obj/object in T.contents) + var/obj/effect/alien/egg/xeno_egg = /obj/effect/alien/egg + if(object.layer > initial(xeno_egg.layer)) + to_chat(user, SPAN_XENOWARNING("[src] cannot be planted below objects that would obscure it.")) + return + user.visible_message(SPAN_XENONOTICE("[user] starts planting [src]."), SPAN_XENONOTICE("You start planting [src]."), null, 5) var/plant_time = 35