Skip to content

Commit

Permalink
Xeno Special Stuctures now ignore Nests. (#6790)
Browse files Browse the repository at this point in the history
# About the pull request

Allow to place special xenos structures nearby nested people, because of
previous code, you were not able to place anything nearby nest, i know
its leftover from previous nest code, where nest were "on ground" but
after they become "Wall nest" it kinda dont make sense for them to block
special structures.

# Explain why it's good for the game

Allow you to build structures near nested people, before that it
required to unnest capture to just place structure with was just
inconvinience.


# Testing Photographs and Procedure

<details>
<summary>Screenshots & Videos</summary>

I will add GIF later.

</details>


# Changelog

:cl: Cuberound, Venuska1117
qol: You can build Special Structures nearby nested people.
/:cl:

---------

Co-authored-by: Drathek <[email protected]>
  • Loading branch information
Venuska1117 and Drulikar committed Jul 29, 2024
1 parent 8e0e639 commit 3e1a72a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/XenoProcs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
else
to_chat(src, SPAN_WARNING("There's nothing in our belly that needs regurgitating."))

/mob/living/carbon/xenomorph/proc/check_alien_construction(turf/current_turf, check_blockers = TRUE, silent = FALSE, check_doors = TRUE)
/mob/living/carbon/xenomorph/proc/check_alien_construction(turf/current_turf, check_blockers = TRUE, silent = FALSE, check_doors = TRUE, ignore_nest = FALSE)
var/has_obstacle
for(var/obj/O in current_turf)
if(check_blockers && istype(O, /obj/effect/build_blocker))
Expand Down Expand Up @@ -447,6 +447,8 @@
if(P.chair_state != DROPSHIP_CHAIR_BROKEN)
has_obstacle = TRUE
break
else if(istype(O, /obj/structure/bed/nest) && ignore_nest)
continue
else
has_obstacle = TRUE
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,11 +709,11 @@
/datum/action/xeno_action/activable/place_construction/proc/spacecheck(mob/living/carbon/xenomorph/X, turf/T, datum/construction_template/xenomorph/tem)
if(tem.block_range)
for(var/turf/TA in range(tem.block_range, T))
if(!X.check_alien_construction(TA, FALSE, TRUE))
if(!X.check_alien_construction(TA, FALSE, TRUE, ignore_nest = TRUE))
to_chat(X, SPAN_WARNING("We need more open space to build here."))
qdel(tem)
return FALSE
if(!X.check_alien_construction(T))
if(!X.check_alien_construction(T, ignore_nest = TRUE))
to_chat(X, SPAN_WARNING("We need more open space to build here."))
qdel(tem)
return FALSE
Expand Down

0 comments on commit 3e1a72a

Please sign in to comment.