mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-15 01:46:41 +01:00
Shuttle Loan Fixes
This commit is contained in:
@@ -24,8 +24,13 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
|
||||
/obj/effect/portal,
|
||||
/obj/item/shared_storage,
|
||||
/obj/structure/extraction_point,
|
||||
/obj/item/hilbertshotel,
|
||||
/obj/machinery/syndicatebomb
|
||||
/obj/machinery/syndicatebomb,
|
||||
/obj/item/hilbertshotel
|
||||
)))
|
||||
|
||||
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 +55,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 - GLOB.cargo_shuttle_leave_behind_typecache)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user