mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
TG Buckle Update (#12375)
This commit is contained in:
committed by
variableundefined
parent
7846268dae
commit
c87389a595
@@ -7,12 +7,6 @@
|
||||
anchored = 1
|
||||
layer = 4
|
||||
armor = list(melee = 100, bullet = 80, laser = 80, energy = 100, bomb = 50, bio = 100, rad = 100)
|
||||
var/list/mobs_can_pass = list(
|
||||
/mob/living/carbon/slime,
|
||||
/mob/living/simple_animal/mouse,
|
||||
/mob/living/silicon/robot/drone,
|
||||
/mob/living/simple_animal/bot/mulebot
|
||||
)
|
||||
var/state = PLASTIC_FLAPS_NORMAL
|
||||
|
||||
/obj/structure/plasticflaps/examine(mob/user)
|
||||
@@ -66,43 +60,40 @@
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/bed/B = A
|
||||
if(istype(A, /obj/structure/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
||||
return 0
|
||||
if(istype(A, /obj/structure/bed) && (B.has_buckled_mobs() || B.density))//if it's a bed/chair and is dense or someone is buckled, it will not pass
|
||||
return FALSE
|
||||
|
||||
if(istype(A, /obj/structure/closet/cardboard))
|
||||
var/obj/structure/closet/cardboard/C = A
|
||||
if(C.move_delay)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(istype(A, /obj/vehicle)) //no vehicles
|
||||
return 0
|
||||
|
||||
var/mob/living/M = A
|
||||
if(istype(M))
|
||||
if(M.lying)
|
||||
return ..()
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(A, mob_type))
|
||||
return ..()
|
||||
if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.dna.species.is_small)
|
||||
return ..()
|
||||
return 0
|
||||
if(ismecha(A))
|
||||
return FALSE
|
||||
|
||||
else if(isliving(A)) // You Shall Not Pass!
|
||||
var/mob/living/M = A
|
||||
if(isbot(A)) //Bots understand the secrets
|
||||
return TRUE
|
||||
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
|
||||
return TRUE
|
||||
if(!M.lying && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
|
||||
if(istype(caller, /mob/living))
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(caller, mob_type))
|
||||
return 1
|
||||
if(isliving(caller))
|
||||
if(isbot(caller))
|
||||
return TRUE
|
||||
|
||||
var/mob/living/M = caller
|
||||
if(!M.ventcrawler && M.mob_size > MOB_SIZE_SMALL)
|
||||
return 0
|
||||
return 1
|
||||
if(!M.ventcrawler && M.mob_size != MOB_SIZE_TINY)
|
||||
return FALSE
|
||||
var/atom/movable/M = caller
|
||||
if(M && M.pulling)
|
||||
return CanAStarPass(ID, to_dir, M.pulling)
|
||||
return TRUE //diseases, stings, etc can pass
|
||||
|
||||
/obj/structure/plasticflaps/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
Reference in New Issue
Block a user