mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
Spirit realm ghosts can't observe (#90556)
This commit is contained in:
committed by
Shadow-Quill
parent
969b685266
commit
0babfe8098
@@ -1485,6 +1485,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
/// Prevents items from being speed potion-ed, but allows their speed to be altered in other ways
|
||||
#define TRAIT_NO_SPEED_POTION "no_speed_potion"
|
||||
|
||||
/// Prevents observers from being able to observe (seeing their UI and such)
|
||||
#define TRAIT_NO_OBSERVE "no_observe"
|
||||
|
||||
/// Demolition modifier when hitting this object is inverted (ie, 1 / demolition)
|
||||
#define TRAIT_INVERTED_DEMOLITION "demolition_inverted"
|
||||
|
||||
|
||||
@@ -620,6 +620,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_NO_EYELIDS" = TRAIT_NO_EYELIDS,
|
||||
"TRAIT_CRUSHER_MARK_IMMUNE" = TRAIT_CRUSHER_MARK_IMMUNE, // BUBBER EDIT ADDITION
|
||||
),
|
||||
/mob/dead/observer = list(
|
||||
"TRAIT_NO_OBSERVE" = TRAIT_NO_OBSERVE,
|
||||
),
|
||||
/obj/item = list(
|
||||
"TRAIT_APC_SHOCKING" = TRAIT_APC_SHOCKING,
|
||||
"TRAIT_AQUARIUM_CONTENT" = TRAIT_AQUARIUM_CONTENT,
|
||||
|
||||
@@ -989,10 +989,6 @@ GLOBAL_VAR_INIT(narsie_summon_count, 0)
|
||||
var/ghost_limit = 3
|
||||
var/ghosts = 0
|
||||
|
||||
/obj/effect/rune/manifest/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/effect/rune/manifest/can_invoke(mob/living/user)
|
||||
if(!(user in get_turf(src)))
|
||||
to_chat(user, span_cult_italic("You must be standing on [src]!"))
|
||||
@@ -1084,6 +1080,7 @@ GLOBAL_VAR_INIT(narsie_summon_count, 0)
|
||||
affecting.visible_message(span_warning("[affecting] freezes statue-still, glowing an unearthly red."), \
|
||||
span_cult("You see what lies beyond. All is revealed. In this form you find that your voice booms louder and you can mark targets for the entire cult"))
|
||||
var/mob/dead/observer/G = affecting.ghostize(TRUE)
|
||||
ADD_TRAIT(G, TRAIT_NO_OBSERVE, CULT_TRAIT)
|
||||
var/datum/action/innate/cult/comm/spirit/CM = new
|
||||
var/datum/action/innate/cult/ghostmark/GM = new
|
||||
G.name = "Dark Spirit of [G.name]"
|
||||
|
||||
@@ -920,7 +920,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Observe"
|
||||
set category = "Ghost"
|
||||
|
||||
if(!isobserver(usr)) //Make sure they're an observer!
|
||||
if(!isobserver(usr) || HAS_TRAIT(src, TRAIT_NO_OBSERVE)) //Make sure they're an observer!
|
||||
return
|
||||
|
||||
reset_perspective(null)
|
||||
@@ -959,6 +959,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
this is a bug (and a past exploit) and should be investigated.")
|
||||
return
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_NO_OBSERVE))
|
||||
return
|
||||
|
||||
//Istype so we filter out points of interest that are not mobs
|
||||
if(client && mob_eye && istype(mob_eye))
|
||||
client.set_eye(mob_eye)
|
||||
|
||||
@@ -147,6 +147,7 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
|
||||
"ghosts" = ghosts,
|
||||
"misc" = misc,
|
||||
"npcs" = npcs,
|
||||
"can_observe" = !HAS_TRAIT(user, TRAIT_NO_OBSERVE),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -86,16 +86,18 @@ export function OrbitSearchBar(props) {
|
||||
tooltipPosition="bottom-start"
|
||||
/>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Button
|
||||
color={autoObserve ? 'good' : 'transparent'}
|
||||
icon={autoObserve ? 'toggle-on' : 'toggle-off'}
|
||||
onClick={() => setAutoObserve(!autoObserve)}
|
||||
tooltip={`Toggle Auto-Observe. When active, you'll
|
||||
{!!data.can_observe && (
|
||||
<Stack.Item>
|
||||
<Button
|
||||
color={autoObserve ? 'good' : 'transparent'}
|
||||
icon={autoObserve ? 'toggle-on' : 'toggle-off'}
|
||||
onClick={() => setAutoObserve(!autoObserve)}
|
||||
tooltip={`Toggle Auto-Observe. When active, you'll
|
||||
see the UI / full inventory of whoever you're orbiting. Neat!`}
|
||||
tooltipPosition="bottom-start"
|
||||
/>
|
||||
</Stack.Item>
|
||||
tooltipPosition="bottom-start"
|
||||
/>
|
||||
</Stack.Item>
|
||||
)}
|
||||
<Stack.Item>
|
||||
<Button
|
||||
color="transparent"
|
||||
|
||||
@@ -20,6 +20,7 @@ export type OrbitData = {
|
||||
misc: Observable[];
|
||||
npcs: Observable[];
|
||||
orbiting: Observable | null;
|
||||
can_observe: BooleanLike;
|
||||
};
|
||||
|
||||
export type Observable = {
|
||||
|
||||
Reference in New Issue
Block a user