diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index dab16589aeef..4298c723052e 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -171,6 +171,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C * * TRUE - all other cases */ /obj/machinery/vending/Initialize(mapload) + if(tilted) + src.tilt() // We don't need to set tilted to false before tilt because it will handle it. var/build_inv = FALSE if(!refill_canister) circuit = null @@ -463,6 +465,9 @@ GLOBAL_LIST_EMPTY(vending_products) break /obj/machinery/vending/proc/tilt(mob/fatty, crit=FALSE) + var/no_tipper = FALSE + if(!fatty) + no_tipper = TRUE visible_message("[src] tips over!") tilted = TRUE layer = ABOVE_MOB_LAYER @@ -474,7 +479,7 @@ GLOBAL_LIST_EMPTY(vending_products) if(forcecrit) crit_case = forcecrit - if(in_range(fatty, src)) + if(no_tipper || in_range(fatty, src)) for(var/mob/living/L in get_turf(fatty)) var/mob/living/carbon/C = L @@ -542,7 +547,7 @@ GLOBAL_LIST_EMPTY(vending_products) M.Turn(pick(90, 270)) transform = M - if(get_turf(fatty) != get_turf(src)) + if(fatty && get_turf(fatty) != get_turf(src)) throw_at(get_turf(fatty), 1, 1, spin=FALSE) /obj/machinery/vending/proc/untilt(mob/user)