Files
Bubberstation/code/game/objects/structures/plasticflaps.dm
phil235 f6db08af2e Contents_explosion() tweaks (#20934)
* When any object is hit by an explosion, we no longer always call ex_act() on all its contents indiscriminately.
The default contents_explosion() does nothing and it's overriden for certain objects only like storage items, machines with occupants, mechs.

I've also overriden handle_atom_del() for many objects so that any sudden deletion of an object referenced in an object var of its container properly nullifies such references, avoiding potential runtime and updating the container's icon_state (e.g. admin-delete a mixer's beaker and the mixer's sprite updates immediately).

I've tweaked bomb effect on worn clothes, having some armor but not 100% now still protects your clothes somewhat.

Fixes some arguments of ex_act in living/ex_act() and other mobs.

* derp and map fixes.

* dem map fixes, man.

* More work on code that use implants, simplified now that we can use the "implants" carbon var.

* some fixes

* more typos and fixes.
2016-10-16 10:01:37 +13:00

64 lines
1.8 KiB
Plaintext

/obj/structure/plasticflaps //HOW DO YOU CALL THOSE THINGS ANYWAY
name = "plastic flaps"
desc = "Definitely can't get past those. No way."
icon = 'icons/obj/stationobjs.dmi' //Change this.
icon_state = "plasticflaps"
density = 0
anchored = 1
layer = ABOVE_MOB_LAYER
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
if(isliving(caller))
if(isbot(caller))
return 1
var/mob/living/M = caller
if(!M.ventcrawler && M.mob_size != MOB_SIZE_TINY)
return 0
return 1 //diseases, stings, etc can pass
/obj/structure/plasticflaps/CanPass(atom/movable/A, turf/T)
if(istype(A) && A.checkpass(PASSGLASS))
return prob(60)
var/obj/structure/bed/B = A
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 0
if(istype(A, /obj/structure/closet/cardboard))
var/obj/structure/closet/cardboard/C = A
if(C.move_delay)
return 0
if(istype(A, /obj/mecha))
return 0
else if(isliving(A)) // You Shall Not Pass!
var/mob/living/M = A
if(isbot(A)) //Bots understand the secrets
return 1
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
return 1
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 0
return ..()
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
name = "airtight plastic flaps"
desc = "Heavy duty, airtight, plastic flaps."
/obj/structure/plasticflaps/mining/New()
air_update_turf(1)
. = ..()
/obj/structure/plasticflaps/mining/CanAtmosPass()
return FALSE
/obj/structure/plasticflaps/mining/Destroy()
var/atom/oldloc = loc
. = ..()
if (oldloc)
oldloc.air_update_turf(1)