This commit is contained in:
VerySoft
2023-06-25 16:47:06 -04:00
parent 151562ea9b
commit 1f05ca5887
4 changed files with 20222 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
/obj/structure/redgate
name = "redgate"
desc = "It leads to someplace else!"
icon = 'icons/obj/redgate.dmi'
icon_state = "off"
density = FALSE
unacidable = TRUE
anchored = TRUE
pixel_x = -16
var/obj/structure/redgate/target
/obj/structure/redgate/Destroy()
if(target)
target.target = null
target = null
target.icon_state = "off"
target.density = FALSE
return ..()
/obj/structure/redgate/proc/teleport(var/mob/M as mob)
if (!istype(M,/mob/living)) //We only want mob/living, no bullets or mechs or AI eyes or items
return
if(!M.ckey) //We only want players, no bringing the weird stuff on the other side back
return
if(!target)
icon_state = "off"
density = FALSE
var/turf/place = get_turf(target)
var/possible_turfs = place.AdjacentTurfs()
if(isemptylist(possible_turfs))
to_chat(M, "<span class='notice'>Something blocks your way.</span>")
return
temptarg = pick(possible_turfs)
do_safe_teleport(M, temptarg, 0)
/obj/structure/redgate/Bumped(mob/M as mob)
src.teleport(M)
return
/obj/structure/redgate/Crossed(mob/M as mob)
src.teleport(M)
return
/obj/structure/redgate/attack_hand(mob/M as mob)
src.teleport(M)
return
/obj/structure/redgate/attack_ghost(var/mob/observer/dead/user)
if(target && user?.client?.holder)
user.forceMove(get_turf(target))
else return
/obj/structure/redgate/away/Initialize()
. = ..()
for(var/obj/structure/redgate/g in world)
if(istype(g, /obj/structure/redgate))
if(g.target)
continue
else if(g.z in using_map.station_levels)
target = g
g.target = src
icon_state = "on"
g.icon_state = "on"
density = TRUE
g.density = TRUE
break
else if(g != src)
target = g
g.target = src
icon_state = "on"
g.icon_state = "on"
density = TRUE
g.density = TRUE
break
if(!target)
log_and_message_admins("An away redgate spawned but wasn't able to find a gateway to link to. If this appeared at roundstart, something has gone wrong, otherwise if you spawn another gate they should connect.")
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because it is too large Load Diff
+1
View File
@@ -1842,6 +1842,7 @@
#include "code\modules\awaymissions\loot.dm"
#include "code\modules\awaymissions\loot_vr.dm"
#include "code\modules\awaymissions\pamphlet.dm"
#include "code\modules\awaymissions\redgate.dm"
#include "code\modules\awaymissions\trigger.dm"
#include "code\modules\awaymissions\zlevel.dm"
#include "code\modules\awaymissions\overmap_renamer\debrisfield_renamer.dm"