From 323c883e8763c75e40faf5d42814d4725a0c0455 Mon Sep 17 00:00:00 2001 From: Morrow Date: Sun, 22 Oct 2023 20:08:11 -0400 Subject: [PATCH 1/2] Fixes some idle drone issues --- .../carbon/xenomorph/ai/movement/drone.dm | 86 ++++++++++--------- 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm index c612fdbe79..ef91bd32bc 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm @@ -15,9 +15,6 @@ if(idle_xeno.throwing) return - if(idle_xeno.resting) - return - if(home_turf) if(get_dist(home_turf, idle_xeno) > max_distance_from_home) home_turf = null @@ -38,52 +35,16 @@ if(next_home_search > world.time) return - var/turf/current_turf = get_turf(idle_xeno.loc) + var/turf/current_turf = get_turf(idle_xeno) next_home_search = world.time + home_search_delay - if(!current_turf.weeds && current_turf.is_weedable() >= FULLY_WEEDABLE) + if(!current_turf.weeds && check_turf(current_turf)) home_turf = current_turf else var/shortest_distance for(var/turf/potential_home as anything in RANGE_TURFS(home_locate_range, current_turf)) - - var/area/found_area = get_area(potential_home) - if(found_area.flags_area & AREA_NOTUNNEL) - continue - - if(found_area.flags_area & AREA_UNWEEDABLE) - continue - - if(!found_area.can_build_special) - continue - - if(potential_home in blacklisted_turfs) - continue - - if(potential_home.weeds) - continue - - if(potential_home.is_weedable() < FULLY_WEEDABLE) - continue - - if(locate(/obj/effect/alien/weeds/node) in range(3, potential_home)) - continue - - if(potential_home.density) + if(!check_turf(potential_home)) continue - var/blocked = FALSE - for(var/atom/potential_blocker as anything in potential_home) - if(potential_blocker.can_block_movement) - blocked = TRUE - break - - if(blocked) - continue - - for(var/obj/structure/struct in potential_home) - if(struct.density && !(struct.flags_atom & ON_BORDER)) - continue - if(shortest_distance && get_dist(idle_xeno, potential_home) > shortest_distance) continue @@ -103,3 +64,44 @@ /datum/xeno_ai_movement/drone/proc/unblacklist_turf(turf/unblacklisting_turf) blacklisted_turfs -= unblacklisting_turf + +/datum/xeno_ai_movement/drone/proc/check_turf(turf/checked_turf) + var/area/found_area = get_area(checked_turf) + if(found_area.flags_area & AREA_NOTUNNEL) + return FALSE + + if(found_area.flags_area & AREA_UNWEEDABLE) + return FALSE + + if(!found_area.can_build_special) + return FALSE + + if(checked_turf in blacklisted_turfs) + return FALSE + + if(checked_turf.weeds) + return FALSE + + if(checked_turf.is_weedable() < FULLY_WEEDABLE) + return FALSE + + if(locate(/obj/effect/alien/weeds/node) in range(3, checked_turf)) + return FALSE + + if(checked_turf.density) + return FALSE + + var/blocked = FALSE + for(var/atom/potential_blocker as anything in checked_turf) + if(potential_blocker.can_block_movement) + blocked = TRUE + break + + if(blocked) + return FALSE + + for(var/obj/structure/struct in checked_turf) + if(struct.density && !(struct.flags_atom & ON_BORDER)) + return FALSE + + return TRUE From 8972de9753be8e70fd0b0cf62c1d733beda6ac84 Mon Sep 17 00:00:00 2001 From: kirieee <140837937+kirieee@users.noreply.github.com> Date: Sun, 22 Oct 2023 22:55:32 -0400 Subject: [PATCH 2/2] door fix + flavor (#25) --- maps/map_files/golden_arrow/golden_arrow.dmm | 51 ++++++++------------ 1 file changed, 19 insertions(+), 32 deletions(-) diff --git a/maps/map_files/golden_arrow/golden_arrow.dmm b/maps/map_files/golden_arrow/golden_arrow.dmm index f77a46b7d7..71575c902c 100644 --- a/maps/map_files/golden_arrow/golden_arrow.dmm +++ b/maps/map_files/golden_arrow/golden_arrow.dmm @@ -218,10 +218,14 @@ }, /area/almayer/hallways/hangar) "bg" = ( -/obj/structure/largecrate/supply/supplies/sandbags, /obj/structure/machinery/light{ dir = 1 }, +/obj/structure/closet/crate/construction, +/obj/item/stack/sandbags_empty/half, +/obj/item/stack/sandbags_empty/half, +/obj/item/stack/sandbags_empty/half, +/obj/item/stack/sandbags_empty/half, /turf/open/floor/almayer{ icon_state = "cargo" }, @@ -3122,8 +3126,6 @@ /obj/structure/closet/secure_closet/personal/cabinet{ req_access = null }, -/obj/item/clothing/suit/storage/jacket/marine/service/tanker, -/obj/item/clothing/suit/storage/jacket/marine/service, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -3385,10 +3387,10 @@ /turf/closed/wall/almayer, /area/almayer/living/platoon_commander_rooms) "vc" = ( -/obj/structure/closet/radiation, /obj/structure/machinery/light{ dir = 1 }, +/obj/structure/closet/emcloset, /turf/open/floor/almayer{ icon_state = "test_floor5" }, @@ -3640,6 +3642,10 @@ /obj/structure/pipes/standard/simple/hidden/supply{ dir = 8 }, +/obj/item/device/walkman{ + pixel_y = -6; + pixel_x = 4 + }, /turf/open/floor/almayer{ dir = 5; icon_state = "plating" @@ -4347,10 +4353,6 @@ name = "Damage Control Locker"; req_one_access = list() }, -/obj/structure/machinery/door/airlock/multi_tile/almayer/engidoor{ - name = "\improper Damage Control Locker"; - req_one_access = list() - }, /turf/open/floor/almayer{ icon_state = "test_floor4" }, @@ -5425,6 +5427,7 @@ "Hx" = ( /obj/structure/closet/secure_closet/engineering_personal, /obj/structure/machinery/light, +/obj/item/device/cassette_tape/aesthetic, /turf/open/floor/almayer{ icon_state = "test_floor5" }, @@ -5565,15 +5568,6 @@ }, /turf/open/floor/plating/plating_catwalk, /area/almayer/squads/alpha/squad_two) -"IN" = ( -/obj/structure/closet/toolcloset, -/obj/structure/machinery/light{ - dir = 1 - }, -/turf/open/floor/almayer{ - icon_state = "plate" - }, -/area/almayer/engineering) "IP" = ( /turf/open/floor/plating/plating_catwalk, /area/almayer/engineering) @@ -6419,7 +6413,7 @@ }, /area/almayer/living/cryo_cells) "NZ" = ( -/obj/structure/closet/radiation, +/obj/structure/closet/secure_closet/engineering_electrical, /turf/open/floor/almayer{ icon_state = "test_floor5" }, @@ -6487,6 +6481,9 @@ "OC" = ( /obj/structure/surface/table/reinforced/almayer_B, /obj/structure/machinery/light, +/obj/item/device/cassette_tape/pop3{ + pixel_y = 3 + }, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -6895,10 +6892,10 @@ /turf/open/floor/plating/plating_catwalk, /area/almayer/living/cryo_cells) "Qz" = ( -/obj/structure/closet/radiation, /obj/structure/machinery/status_display{ pixel_y = 30 }, +/obj/structure/closet/firecloset/full, /turf/open/floor/almayer{ icon_state = "test_floor5" }, @@ -7772,15 +7769,6 @@ }, /turf/open/floor/plating/plating_catwalk, /area/almayer/living/grunt_rnr) -"UR" = ( -/obj/structure/pipes/standard/simple/hidden/supply{ - dir = 8 - }, -/turf/open/floor/almayer{ - dir = 5; - icon_state = "plating" - }, -/area/almayer/engineering) "UT" = ( /obj/structure/machinery/disposal{ density = 0; @@ -8251,12 +8239,11 @@ }, /area/almayer/engineering) "XP" = ( -/obj/effect/decal/cleanable/greenglow, -/obj/structure/reagent_dispensers/fueltank/custom, /obj/structure/sign/safety/storage{ pixel_x = 7; pixel_y = -28 }, +/obj/structure/reagent_dispensers/ammoniatank, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -21750,7 +21737,7 @@ DC RW mZ TN -IN +CX IP gf Bd @@ -22668,7 +22655,7 @@ fm fm fm TN -UR +yc Sn Vq YB