mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Made effect teleporting into a trait. (#24640)
This commit is contained in:
@@ -363,3 +363,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
// turf trait sources
|
||||
#define FLOOR_EFFECT_TRAIT "floor_effect_trait"
|
||||
|
||||
//***** TURF TRAITS *****//
|
||||
// Causes the effect to go through a teleporter instead of being deleted by it.
|
||||
#define TRAIT_EFFECT_CAN_TELEPORT "trait_effect_can_teleport"
|
||||
|
||||
@@ -111,6 +111,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
),
|
||||
/turf = list(
|
||||
"bluespace_speed_trait" = TRAIT_BLUESPACE_SPEED
|
||||
),
|
||||
/obj/effect = list(
|
||||
"TRAIT_EFFECT_CAN_TELEPORT" = TRAIT_EFFECT_CAN_TELEPORT
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
//must succeed in most cases
|
||||
/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
|
||||
if(iseffect(ateleatom) && !istype(ateleatom, /obj/effect/dummy/chameleon))
|
||||
if(iseffect(ateleatom) && !HAS_TRAIT(ateleatom, TRAIT_EFFECT_CAN_TELEPORT))
|
||||
qdel(ateleatom)
|
||||
return FALSE
|
||||
if(istype(ateleatom))
|
||||
|
||||
@@ -101,6 +101,10 @@
|
||||
var/can_move = TRUE
|
||||
var/obj/item/chameleon/master = null
|
||||
|
||||
/obj/effect/dummy/chameleon/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_EFFECT_CAN_TELEPORT, ROUNDSTART_TRAIT)
|
||||
|
||||
/obj/effect/dummy/chameleon/proc/activate(obj/O, mob/M, new_icon, new_iconstate, new_overlays, new_underlays, obj/item/chameleon/C)
|
||||
name = O.name
|
||||
desc = O.desc
|
||||
|
||||
@@ -178,6 +178,10 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
desc = "you shouldnt see this"
|
||||
var/atom/movable/stored_obj
|
||||
|
||||
/obj/effect/extraction_holder/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_EFFECT_CAN_TELEPORT, ROUNDSTART_TRAIT)
|
||||
|
||||
/obj/item/extraction_pack/proc/check_for_living_mobs(atom/A)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
|
||||
@@ -405,6 +405,10 @@
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
var/can_destroy = FALSE
|
||||
|
||||
/obj/effect/immortality_talisman/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_EFFECT_CAN_TELEPORT, ROUNDSTART_TRAIT)
|
||||
|
||||
/obj/effect/immortality_talisman/attackby()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user