mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Improves logging on teleportation portals (#17637)
* teleporter logging * affected review and improvements
This commit is contained in:
@@ -6,7 +6,10 @@
|
||||
anchored = TRUE
|
||||
|
||||
var/obj/item/target = null
|
||||
var/creator = null
|
||||
/// The UID and `name` of the object that created this portal. For example, a wormhole jaunter.
|
||||
var/list/creation_obj_data
|
||||
/// The ckey of the mob which was responsible for the creation of the portal. For example, the mob who used a wormhole jaunter.
|
||||
var/creation_mob_ckey
|
||||
|
||||
var/failchance = 5
|
||||
var/fail_icon = "portal1"
|
||||
@@ -16,26 +19,23 @@
|
||||
var/ignore_tele_proof_area_setting = FALSE
|
||||
var/one_use = FALSE // Does this portal go away after one teleport?
|
||||
|
||||
/obj/effect/portal/New(loc, turf/target, creator = null, lifespan = 300)
|
||||
/obj/effect/portal/New(loc, turf/_target, obj/creation_object = null, lifespan = 300, mob/creation_mob = null)
|
||||
..()
|
||||
|
||||
GLOB.portals += src
|
||||
|
||||
src.target = target
|
||||
src.creator = creator
|
||||
target = _target
|
||||
creation_obj_data = list(creation_object.UID(), "[creation_object.name]") // Store the name incase the object is deleted.
|
||||
creation_mob_ckey = creation_mob?.ckey
|
||||
|
||||
if(lifespan > 0)
|
||||
spawn(lifespan)
|
||||
qdel(src)
|
||||
QDEL_IN(src, lifespan)
|
||||
|
||||
/obj/effect/portal/Destroy()
|
||||
GLOB.portals -= src
|
||||
|
||||
if(isobj(creator))
|
||||
var/obj/O = creator
|
||||
var/obj/O = locateUID(creation_obj_data[1])
|
||||
if(!QDELETED(O))
|
||||
O.portal_destroyed(src)
|
||||
|
||||
creator = null
|
||||
target = null
|
||||
return ..()
|
||||
|
||||
@@ -98,7 +98,13 @@
|
||||
return FALSE
|
||||
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] has used a portal at [ADMIN_VERBOSEJMP(src)] made by [key_name_admin(usr)].")
|
||||
var/creator_string = ""
|
||||
var/obj_name = creation_obj_data[2]
|
||||
if(creation_mob_ckey)
|
||||
creator_string = " created by [key_name_admin(GLOB.directory[creation_mob_ckey])][obj_name ? " using \a [obj_name]" : ""]"
|
||||
else if(obj_name)
|
||||
creator_string = " created by \a [obj_name]"
|
||||
message_admins("[M] has used a portal at [ADMIN_VERBOSEJMP(src)][creator_string].")
|
||||
|
||||
if(prob(failchance))
|
||||
icon_state = fail_icon
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
U.message_holder("Extraction signal received, agent. [SSmapping.map_datum.fluff_name]'s bluespace transport jamming systems have been sabotaged. "\
|
||||
+ "We have opened a temporary portal at your flare location - proceed to the target's extraction by inserting them into the portal.", 'sound/effects/confirmdropoff.ogg')
|
||||
// Open a portal
|
||||
var/obj/effect/portal/redspace/contractor/P = new(get_turf(F), pick(GLOB.syndieprisonwarp), null, 0)
|
||||
var/obj/effect/portal/redspace/contractor/P = new(get_turf(F), pick(GLOB.syndieprisonwarp), F, 0, M)
|
||||
P.contract = src
|
||||
P.contractor_mind = M.mind
|
||||
P.target_mind = contract.target
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
to_chat(user, "<span class='notice'>[src] found no beacons in the world to anchor a wormhole to.</span>")
|
||||
return
|
||||
var/chosen_beacon = pick(L)
|
||||
var/obj/effect/portal/jaunt_tunnel/J = new(get_turf(src), get_turf(chosen_beacon), src, 100)
|
||||
var/obj/effect/portal/jaunt_tunnel/J = new(get_turf(src), get_turf(chosen_beacon), src, 100, user)
|
||||
J.emagged = emagged
|
||||
if(adjacent)
|
||||
try_move_adjacent(J)
|
||||
|
||||
Reference in New Issue
Block a user