diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index 956adec1fb..270f52410c 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -1,3 +1,10 @@ +var/bluespace_item_types = newlist(/obj/item/weapon/storage/backpack/holding, +/obj/item/weapon/storage/bag/trash/holding, +/obj/item/weapon/storage/pouch/holding, +/obj/item/weapon/storage/belt/utility/holding, +/obj/item/weapon/storage/belt/medical/holding +) + //wrapper /proc/do_teleport(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null, local=TRUE, bohsafe=FALSE) //CHOMPStation Edit new /datum/teleport/instant/science(arglist(args)) @@ -157,21 +164,27 @@ /datum/teleport/instant/science/setPrecision(aprecision) ..() - if(bohsafe) - return 1 - if(istype(teleatom, /obj/item/weapon/storage/backpack/holding)) - precision = rand(1,100) + if(bohsafe) //CHOMPedit + return 1 //CHOMPedit + + var/list/bluespace_things = newlist() + + for (var/item in bluespace_item_types) + if (istype(teleatom, item)) + precision = rand(1, 100) + bluespace_things |= teleatom.search_contents_for(item) - var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding) //VOREStation Addition Start: Prevent taurriding abuse if(istype(teleatom, /mob/living)) var/mob/living/L = teleatom if(LAZYLEN(L.buckled_mobs)) for(var/mob/rider in L.buckled_mobs) - bagholding += rider.search_contents_for(/obj/item/weapon/storage/backpack/holding) + for (var/item in bluespace_item_types) + bluespace_things |= rider.search_contents_for(item) //VOREStation Addition End: Prevent taurriding abuse - if(bagholding.len) - precision = max(rand(1,100)*bagholding.len,100) + + if(bluespace_things.len) + precision = max(rand(1,100)*bluespace_things.len,100) if(istype(teleatom, /mob/living)) var/mob/living/MM = teleatom to_chat(MM, "The Bluespace interface on your [teleatom] interferes with the teleport!") @@ -226,4 +239,4 @@ return 0 else return 1 - //VOREStation Edit End \ No newline at end of file + //VOREStation Edit End