mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Cult Ghost Manifestation
Turns out ghosts could be pulled into reality in two places. This ensures both use the same method.
This commit is contained in:
@@ -330,14 +330,6 @@
|
||||
|
||||
// Simple helper to face what you clicked on, in case it should be needed in more than one place
|
||||
/mob/proc/face_atom(var/atom/A)
|
||||
// Snowflake for space vines.
|
||||
var/is_buckled = 0
|
||||
if(buckled)
|
||||
if(istype(buckled))
|
||||
if(!buckled.movable)
|
||||
is_buckled = 1
|
||||
else
|
||||
is_buckled = 0
|
||||
if(!A || !x || !y || !A.x || !A.y) return
|
||||
var/dx = A.x - x
|
||||
var/dy = A.y - y
|
||||
|
||||
@@ -331,11 +331,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
|
||||
if(istype(M,/mob/dead))
|
||||
var/mob/dead/D = M
|
||||
D.manifest()
|
||||
user.visible_message( \
|
||||
"\red [user] drags the ghost to our plan of reality!", \
|
||||
"\red You drag the ghost to our plan of reality!" \
|
||||
)
|
||||
D.manifest(user)
|
||||
return
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
@@ -83,18 +83,7 @@
|
||||
/mob/dead/attackby(obj/item/W, mob/user)
|
||||
if(istype(W,/obj/item/weapon/book/tome))
|
||||
var/mob/dead/M = src
|
||||
if(src.invisibility != 0)
|
||||
M.invisibility = 0
|
||||
user.visible_message( \
|
||||
"\red [user] drags ghost, [M], to our plan of reality!", \
|
||||
"\red You drag [M] to our plan of reality!" \
|
||||
)
|
||||
else
|
||||
user.visible_message ( \
|
||||
"\red [user] just tried to smash his book into that ghost! It's not very effective", \
|
||||
"\red You get the feeling that the ghost can't become any more visible." \
|
||||
)
|
||||
|
||||
M.manifest(user)
|
||||
|
||||
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 1
|
||||
@@ -556,9 +545,23 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A]</span>")
|
||||
return 1
|
||||
|
||||
/mob/dead/proc/manifest()
|
||||
verbs += /mob/dead/proc/toggle_visibility
|
||||
toggle_visibility()
|
||||
/mob/dead/proc/manifest(mob/user)
|
||||
var/is_manifest = 0
|
||||
if(!is_manifest)
|
||||
is_manifest = 1
|
||||
verbs += /mob/dead/proc/toggle_visibility
|
||||
|
||||
if(src.invisibility != 0)
|
||||
user.visible_message( \
|
||||
"<span class='warning'>[user] drags ghost, [src], to our plan of reality!</span>", \
|
||||
"<span class='warning'>You drag [src] to our plan of reality!</span>" \
|
||||
)
|
||||
toggle_visibility(1)
|
||||
else
|
||||
user.visible_message ( \
|
||||
"<span class='warning'>[user] just tried to smash his book into that ghost! It's not very effective.</span>", \
|
||||
"<span class='warning'>You get the feeling that the ghost can't become any more visible.</span>" \
|
||||
)
|
||||
|
||||
/mob/dead/proc/toggle_icon(var/icon)
|
||||
if(!client)
|
||||
@@ -574,22 +577,21 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon)
|
||||
client.images += J
|
||||
|
||||
/mob/dead/proc/toggle_visibility()
|
||||
/mob/dead/proc/toggle_visibility(var/forced = 0)
|
||||
set category = "Ghost"
|
||||
set name = "Toggle Visibility"
|
||||
set desc = "Allows you to turn (in)visible (almost) at will."
|
||||
|
||||
var/toggled_invisible
|
||||
|
||||
if(invisibility && world.time < toggled_invisible + 600)
|
||||
if(!forced && invisibility && world.time < toggled_invisible + 600)
|
||||
src << "You must gather strength before you can turn visible again..."
|
||||
return
|
||||
|
||||
if(invisibility == 0)
|
||||
toggled_invisible = world.time
|
||||
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible</span>")
|
||||
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible.</span>")
|
||||
else
|
||||
src << "<span class='info'>You are now visible</span>"
|
||||
src << "<span class='info'>You are now visible!</span>"
|
||||
|
||||
invisibility = invisibility == INVISIBILITY_OBSERVER ? 0 : INVISIBILITY_OBSERVER
|
||||
// Give the ghost a cult icon which should be visible only to itself
|
||||
|
||||
Reference in New Issue
Block a user