mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
Adds a few turf istype helpers (#20754)
* a very calming act when the world is too much, too fast * i'm tired but i have to be efficient, infinite * lick your lips at the sight of me a fantasy made reality
This commit is contained in:
@@ -195,7 +195,7 @@
|
||||
if(3)
|
||||
icon = 'icons/obj/smooth_structures/alien/weeds3.dmi'
|
||||
linked_node = node
|
||||
if(istype(loc, /turf/open/space))
|
||||
if(isspaceturf(loc))
|
||||
qdel(src)
|
||||
return
|
||||
addtimer(src, "Life", rand(150, 200))
|
||||
@@ -208,7 +208,7 @@
|
||||
set background = BACKGROUND_ENABLED
|
||||
var/turf/U = get_turf(src)
|
||||
|
||||
if(istype(U, /turf/open/space))
|
||||
if(isspaceturf(U))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
|
||||
for(var/turf/T in U.GetAtmosAdjacentTurfs())
|
||||
|
||||
if (locate(/obj/structure/alien/weeds) in T || istype(T, /turf/open/space))
|
||||
if (locate(/obj/structure/alien/weeds) in T || isspaceturf(T))
|
||||
continue
|
||||
|
||||
new /obj/structure/alien/weeds(T, linked_node)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(isrobot(user) || isalien(user))
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/extinguisher))
|
||||
if(!has_extinguisher && opened)
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(has_extinguisher)
|
||||
user.put_in_hands(has_extinguisher)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
if(T.density)
|
||||
user << "<span class='warning'>[src] is blocked!</span>"
|
||||
return
|
||||
if(!istype(T, /turf/open/floor))
|
||||
if(!isfloorturf(T))
|
||||
user << "<span class='warning'>[src] bolts must be tightened on the floor!</span>"
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='notice'>You tighten the bolts on the wall.</span>")
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params)
|
||||
if(isrobot(user) || istype(I,/obj/item/device/multitool))
|
||||
if(iscyborg(user) || istype(I,/obj/item/device/multitool))
|
||||
toggle_lock(user)
|
||||
return
|
||||
if(open || health <= 0)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(!istype(loc, /turf/open/floor))
|
||||
if(!isfloorturf(loc))
|
||||
user << "<span class='warning'>A floor must be present to secure the girder!</span>"
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
@@ -86,10 +86,10 @@
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack))
|
||||
if (istype(src.loc, /turf/closed/wall))
|
||||
if(iswallturf(loc))
|
||||
user << "<span class='warning'>There is already a wall present!</span>"
|
||||
return
|
||||
if (!istype(src.loc, /turf/open/floor))
|
||||
if(!isfloorturf(src.loc))
|
||||
user << "<span class='warning'>A floor must be present to build a false wall!</span>"
|
||||
return
|
||||
if (locate(/obj/structure/falsewall) in src.loc.contents)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
add_overlay("[icon_state]_door")
|
||||
|
||||
/obj/structure/guncase/attackby(obj/item/I, mob/user, params)
|
||||
if(isrobot(user) || isalien(user))
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(istype(I, gun_category))
|
||||
if(contents.len < capacity && open)
|
||||
@@ -53,7 +53,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/guncase/attack_hand(mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(contents.len && open)
|
||||
ShowWindow(user)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
else if(iscyborg(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"<span class='notice'>You loosen the [name]'s bolts!</span>")
|
||||
anchored = 0
|
||||
else
|
||||
if (!istype(src.loc, /turf/open/floor))
|
||||
if(!isfloorturf(src.loc))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>")
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_perspective(null)
|
||||
|
||||
//if(moving && istype(loc, /turf/open/space))
|
||||
//if(moving && isspaceturf(loc))
|
||||
// Todo: If you get out of a moving pod in space, you should move as well.
|
||||
// Same direction as pod? Direcion you moved? Halfway between?
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
else
|
||||
wash_obj(G)
|
||||
else
|
||||
if(istype(loc, /turf/open))
|
||||
if(isopenturf(loc))
|
||||
var/turf/open/tile = loc
|
||||
tile.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user