From fc2a86420251776a6a8cf3ea70b78df619479dcf Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 27 Nov 2023 18:32:43 -0800 Subject: [PATCH 1/2] egg changes --- code/__DEFINES/layers.dm | 2 ++ code/modules/cm_aliens/structures/egg.dm | 2 +- code/modules/mob/living/carbon/xenomorph/egg_item.dm | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index c0ccd5164b0b..fb99f8da321b 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -125,6 +125,8 @@ /// 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 ce0be7c0c8a1..5a71e7ed4a10 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 = LYING_BETWEEN_MOB_LAYER //to stop hiding eggs under corpses + layer = EGG_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 05d456d0025d..60f1202d1ab3 100644 --- a/code/modules/mob/living/carbon/xenomorph/egg_item.dm +++ b/code/modules/mob/living/carbon/xenomorph/egg_item.dm @@ -102,6 +102,10 @@ to_chat(user, SPAN_XENOWARNING("[src] can only be planted on [lowertext(hive.prefix)]hive weeds.")) return + if(istype(get_area(T), /area/vehicle)) + to_chat(user, SPAN_XENOWARNING("[src] cannot be planted inside a vehicle.")) + return + user.visible_message(SPAN_XENONOTICE("[user] starts planting [src]."), SPAN_XENONOTICE("You start planting [src]."), null, 5) var/plant_time = 35 From ecf4515eaf73350e6f9637e13cdaaa6d6a85551d Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 27 Nov 2023 19:51:46 -0800 Subject: [PATCH 2/2] 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