mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Micro tunnel fixes (#8995)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
var/global/list/micro_tunnels = list()
|
||||||
|
|
||||||
/obj/structure/micro_tunnel
|
/obj/structure/micro_tunnel
|
||||||
name = "mouse hole"
|
name = "mouse hole"
|
||||||
desc = "A tiny little hole... where does it go?"
|
desc = "A tiny little hole... where does it go?"
|
||||||
@@ -18,6 +20,10 @@
|
|||||||
/mob/living/simple_mob/slime
|
/mob/living/simple_mob/slime
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/obj/structure/micro_tunnel/New()
|
||||||
|
. = ..()
|
||||||
|
micro_tunnels.Add(src)
|
||||||
|
|
||||||
/obj/structure/micro_tunnel/Initialize()
|
/obj/structure/micro_tunnel/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
if(name == initial(name))
|
if(name == initial(name))
|
||||||
@@ -34,6 +40,8 @@
|
|||||||
thing.forceMove(get_turf(src.loc))
|
thing.forceMove(get_turf(src.loc))
|
||||||
thing.cancel_camera()
|
thing.cancel_camera()
|
||||||
|
|
||||||
|
micro_tunnels.Remove(src)
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/structure/micro_tunnel/set_dir(new_dir)
|
/obj/structure/micro_tunnel/set_dir(new_dir)
|
||||||
@@ -63,7 +71,7 @@
|
|||||||
if(myturf.z in P.expected_z_levels)
|
if(myturf.z in P.expected_z_levels)
|
||||||
planet = P
|
planet = P
|
||||||
else
|
else
|
||||||
for(var/obj/structure/micro_tunnel/t in world)
|
for(var/obj/structure/micro_tunnel/t in micro_tunnels)
|
||||||
if(t == src)
|
if(t == src)
|
||||||
continue
|
continue
|
||||||
if(magic || t.magic)
|
if(magic || t.magic)
|
||||||
@@ -342,6 +350,8 @@
|
|||||||
return
|
return
|
||||||
if(QDELETED(src))
|
if(QDELETED(src))
|
||||||
return
|
return
|
||||||
|
if(usr.loc != src)
|
||||||
|
return
|
||||||
var/obj/our_choice = choice
|
var/obj/our_choice = choice
|
||||||
|
|
||||||
var/list/new_contained_mobs = list()
|
var/list/new_contained_mobs = list()
|
||||||
|
|||||||
Reference in New Issue
Block a user