From d9cd90c3c5a7678c3bccca440c67075b13e35143 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 16 Dec 2019 11:31:03 -0700 Subject: [PATCH 1/2] Update supply.dm --- code/modules/shuttle/supply.dm | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index c38cef5ea8..a5a5efd43d 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -26,6 +26,13 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( /obj/structure/extraction_point, /obj/machinery/syndicatebomb, /obj/item/hilbertshotel + )) + - typecacheof(list(/mob/living/simple_animal/revenant, /mob/living/simple_animal/slaughter)) //These things have snowflake handling. + ) + +GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list( + /mob/living/simple_animal/revenant, + /mob/living/simple_animal/slaughter ))) /obj/docking_port/mobile/supply @@ -50,16 +57,27 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( /obj/docking_port/mobile/supply/canMove() if(is_station_level(z)) - return check_blacklist(shuttle_areas) + return check_blacklist(shuttle_areas, GLOB.blacklisted_cargo_types) return ..() -/obj/docking_port/mobile/supply/proc/check_blacklist(areaInstances) +/obj/docking_port/mobile/supply/enterTransit() + var/list/leave_behind = list() + for(var/i in check_blacklist(shuttle_areas, GLOB.cargo_shuttle_leave_behind_typecache)) + var/atom/movable/AM = i + leave_behind[AM] = AM.loc + . = ..() + for(var/kicked in leave_behind) + var/atom/movable/victim = kicked + var/atom/oldloc = leave_behind[victim] + victim.forceMove(oldloc) + +/obj/docking_port/mobile/supply/proc/check_blacklist(areaInstances, list/typecache) for(var/place in areaInstances) var/area/shuttle/shuttle_area = place for(var/trf in shuttle_area) var/turf/T = trf for(var/a in T.GetAllContents()) - if(is_type_in_typecache(a, GLOB.blacklisted_cargo_types)) + if(is_type_in_typecache(a, typecache)) return FALSE if(istype(a, /obj/structure/closet))//Prevents eigenlockers from ending up at CC var/obj/structure/closet/c = a From f39d12527d1d5c6b36febd72d489d78374dfbd89 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sat, 21 Dec 2019 23:50:59 -0800 Subject: [PATCH 2/2] Update supply.dm --- code/modules/shuttle/supply.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index a5a5efd43d..2ac6df7668 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -26,9 +26,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( /obj/structure/extraction_point, /obj/machinery/syndicatebomb, /obj/item/hilbertshotel - )) - - typecacheof(list(/mob/living/simple_animal/revenant, /mob/living/simple_animal/slaughter)) //These things have snowflake handling. - ) + ))) GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list( /mob/living/simple_animal/revenant, @@ -57,7 +55,7 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list( /obj/docking_port/mobile/supply/canMove() if(is_station_level(z)) - return check_blacklist(shuttle_areas, GLOB.blacklisted_cargo_types) + return check_blacklist(shuttle_areas, GLOB.blacklisted_cargo_types - GLOB.cargo_shuttle_leave_behind_typecache) return ..() /obj/docking_port/mobile/supply/enterTransit()