mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
Ports RS 658, 661
This commit is contained in:
@@ -187,6 +187,27 @@ Works together with spawning an observer, noted above.
|
||||
|
||||
handle_regular_hud_updates()
|
||||
handle_vision()
|
||||
check_area() //RS Port #658
|
||||
|
||||
//RS Port #658 Start
|
||||
/mob/observer/dead/proc/check_area()
|
||||
if(client?.holder)
|
||||
return
|
||||
if(!isturf(loc))
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
if(A.block_ghosts)
|
||||
to_chat(src, span_warning("Ghosts can't enter this location."))
|
||||
return_to_spawn()
|
||||
|
||||
/mob/observer/dead/proc/return_to_spawn()
|
||||
if(following)
|
||||
stop_following()
|
||||
var/obj/O = locate("landmark*Observer-Start")
|
||||
if(istype(O))
|
||||
to_chat(src, span_notice("Now teleporting."))
|
||||
forceMove(O.loc)
|
||||
//RS Port #658 End
|
||||
|
||||
/mob/proc/ghostize(var/can_reenter_corpse = 1)
|
||||
if(key)
|
||||
@@ -223,7 +244,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
announce_ghost_joinleave(ghostize(1))
|
||||
else
|
||||
var/response
|
||||
if(check_rights(R_ADMIN|R_SERVER|R_MOD,FALSE,src)) //No need to sanity check for client and holder here as that is part of check_rights
|
||||
if(src.client && src.client.holder)
|
||||
response = tgui_alert(src, "You have the ability to Admin-Ghost. The regular Ghost verb will announce your presence to dead chat. Both variants will allow you to return to your body using 'aghost'.\n\nWhat do you wish to do?", "Are you sure you want to ghost?", list("Admin Ghost", "Ghost", "Stay in body"))
|
||||
if(response == "Admin Ghost")
|
||||
if(!src.client)
|
||||
@@ -429,6 +450,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
stop_following()
|
||||
return
|
||||
|
||||
//RS Port #658 Start
|
||||
var/area/A = get_area(destination)
|
||||
if(A.block_ghosts)
|
||||
to_chat(src,span_warning("Sorry, that area does not allow ghosts."))
|
||||
if(following)
|
||||
stop_following()
|
||||
return
|
||||
//RS Port #658 End
|
||||
return ..()
|
||||
|
||||
/mob/observer/dead/Move(atom/newloc, direct = 0, movetime)
|
||||
|
||||
@@ -31,6 +31,13 @@
|
||||
set desc = "Shift yourself out of alignment with realspace to travel quickly to different areas."
|
||||
set category = "Abilities.Shadekin"
|
||||
|
||||
//RS Port #658 Start
|
||||
var/area/A = get_area(src)
|
||||
if(!client?.holder && A.block_phase_shift)
|
||||
to_chat(src, span_warning("You can't do that here!"))
|
||||
return
|
||||
//RS Port #658 End
|
||||
|
||||
var/ability_cost = 100
|
||||
|
||||
var/darkness = 1
|
||||
@@ -88,6 +95,40 @@
|
||||
canmove = FALSE
|
||||
|
||||
//Shifting in
|
||||
if(ability_flags & AB_PHASE_SHIFTED)
|
||||
phase_in(original_canmove)
|
||||
//Shifting out
|
||||
else
|
||||
phase_out(original_canmove)
|
||||
|
||||
/mob/living/carbon/human/proc/phase_out(var/original_canmove)
|
||||
ability_flags |= AB_PHASE_SHIFTED
|
||||
ability_flags |= AB_PHASE_SHIFTING
|
||||
mouse_opacity = 0
|
||||
custom_emote(1,"phases out!")
|
||||
name = get_visible_name()
|
||||
|
||||
for(var/obj/belly/B as anything in vore_organs)
|
||||
B.escapable = FALSE
|
||||
|
||||
var/obj/effect/temp_visual/shadekin/phase_out/phaseanim = new /obj/effect/temp_visual/shadekin/phase_out(src.loc)
|
||||
phaseanim.dir = dir
|
||||
alpha = 0
|
||||
add_modifier(/datum/modifier/shadekin_phase_vision)
|
||||
sleep(5)
|
||||
invisibility = INVISIBILITY_LEVEL_TWO
|
||||
see_invisible = INVISIBILITY_LEVEL_TWO
|
||||
//cut_overlays()
|
||||
update_icon()
|
||||
alpha = 127
|
||||
|
||||
canmove = original_canmove
|
||||
incorporeal_move = TRUE
|
||||
density = FALSE
|
||||
force_max_speed = TRUE
|
||||
ability_flags &= ~AB_PHASE_SHIFTING
|
||||
|
||||
/mob/living/carbon/human/proc/phase_in(var/original_canmove)
|
||||
if(ability_flags & AB_PHASE_SHIFTED)
|
||||
ability_flags &= ~AB_PHASE_SHIFTED
|
||||
ability_flags |= AB_PHASE_SHIFTING
|
||||
@@ -137,33 +178,6 @@
|
||||
L.broken()
|
||||
else
|
||||
L.flicker(10)
|
||||
//Shifting out
|
||||
else
|
||||
ability_flags |= AB_PHASE_SHIFTED
|
||||
ability_flags |= AB_PHASE_SHIFTING
|
||||
mouse_opacity = 0
|
||||
custom_emote(1,"phases out!")
|
||||
name = get_visible_name()
|
||||
|
||||
for(var/obj/belly/B as anything in vore_organs)
|
||||
B.escapable = FALSE
|
||||
|
||||
var/obj/effect/temp_visual/shadekin/phase_out/phaseanim = new /obj/effect/temp_visual/shadekin/phase_out(src.loc)
|
||||
phaseanim.dir = dir
|
||||
alpha = 0
|
||||
add_modifier(/datum/modifier/shadekin_phase_vision)
|
||||
sleep(5)
|
||||
invisibility = INVISIBILITY_LEVEL_TWO
|
||||
see_invisible = INVISIBILITY_LEVEL_TWO
|
||||
//cut_overlays()
|
||||
update_icon()
|
||||
alpha = 127
|
||||
|
||||
canmove = original_canmove
|
||||
incorporeal_move = TRUE
|
||||
density = FALSE
|
||||
force_max_speed = TRUE
|
||||
ability_flags &= ~AB_PHASE_SHIFTING
|
||||
|
||||
/datum/modifier/shadekin_phase_vision
|
||||
name = "Shadekin Phase Vision"
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
// Phase shifting procs (and related procs)
|
||||
/mob/living/simple_mob/shadekin/proc/phase_shift()
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = T.loc //RS Port #658
|
||||
if(!T.CanPass(src,T) || loc != T)
|
||||
to_chat(src,span_warning("You can't use that here!"))
|
||||
return FALSE
|
||||
//RS Port #658 Start
|
||||
if(!client?.holder && A.block_phase_shift)
|
||||
to_chat(src,span_warning("You can't use that here!"))
|
||||
return FALSE
|
||||
//RS Port #658 End
|
||||
|
||||
forceMove(T)
|
||||
var/original_canmove = canmove
|
||||
@@ -17,6 +23,36 @@
|
||||
canmove = FALSE
|
||||
|
||||
//Shifting in
|
||||
if(ability_flags & AB_PHASE_SHIFTED)
|
||||
phase_in(original_canmove)
|
||||
//Shifting out
|
||||
else
|
||||
phase_out(original_canmove)
|
||||
|
||||
/mob/living/simple_mob/shadekin/proc/phase_out(var/original_canmove)
|
||||
ability_flags |= AB_PHASE_SHIFTED
|
||||
mouse_opacity = 0
|
||||
custom_emote(1,"phases out!")
|
||||
real_name = name
|
||||
name = "Something"
|
||||
|
||||
for(var/obj/belly/B as anything in vore_organs)
|
||||
B.escapable = FALSE
|
||||
|
||||
cut_overlays()
|
||||
flick("tp_out",src)
|
||||
sleep(5)
|
||||
invisibility = INVISIBILITY_LEVEL_TWO
|
||||
see_invisible = INVISIBILITY_LEVEL_TWO
|
||||
update_icon()
|
||||
alpha = 127
|
||||
|
||||
canmove = original_canmove
|
||||
incorporeal_move = TRUE
|
||||
density = FALSE
|
||||
force_max_speed = TRUE
|
||||
|
||||
/mob/living/simple_mob/shadekin/proc/phase_in(var/original_canmove)
|
||||
if(ability_flags & AB_PHASE_SHIFTED)
|
||||
ability_flags &= ~AB_PHASE_SHIFTED
|
||||
mouse_opacity = 1
|
||||
@@ -67,30 +103,6 @@
|
||||
else
|
||||
L.flicker(10)
|
||||
|
||||
//Shifting out
|
||||
else
|
||||
ability_flags |= AB_PHASE_SHIFTED
|
||||
mouse_opacity = 0
|
||||
custom_emote(1,"phases out!")
|
||||
real_name = name
|
||||
name = "Something"
|
||||
|
||||
for(var/obj/belly/B as anything in vore_organs)
|
||||
B.escapable = FALSE
|
||||
|
||||
cut_overlays()
|
||||
flick("tp_out",src)
|
||||
sleep(5)
|
||||
invisibility = INVISIBILITY_LEVEL_TWO
|
||||
see_invisible = INVISIBILITY_LEVEL_TWO
|
||||
update_icon()
|
||||
alpha = 127
|
||||
|
||||
canmove = original_canmove
|
||||
incorporeal_move = TRUE
|
||||
density = FALSE
|
||||
force_max_speed = TRUE
|
||||
|
||||
/mob/living/simple_mob/shadekin/UnarmedAttack()
|
||||
if(ability_flags & AB_PHASE_SHIFTED)
|
||||
return FALSE //Nope.
|
||||
|
||||
@@ -350,14 +350,27 @@
|
||||
switch(mob.incorporeal_move)
|
||||
if(1)
|
||||
var/turf/T = get_step(mob, direct)
|
||||
var/area/A = T.loc //RS Port #658
|
||||
if(!T)
|
||||
return
|
||||
if(mob.check_holy(T))
|
||||
to_chat(mob, span_warning("You cannot get past holy grounds while you are in this plane of existence!"))
|
||||
return
|
||||
else
|
||||
mob.forceMove(get_step(mob, direct))
|
||||
mob.dir = direct
|
||||
//RS Port #658 Start
|
||||
if(!holder)
|
||||
if(isliving(mob) && A.block_phase_shift)
|
||||
to_chat(mob, span_warning("Something blocks you from entering this location while phased out."))
|
||||
return
|
||||
if(isobserver(mob) && A.block_ghosts)
|
||||
to_chat(mob, span_warning("Ghosts can't enter this location."))
|
||||
var/area/our_area = mobloc.loc
|
||||
if(our_area.block_ghosts)
|
||||
var/mob/observer/dead/D = mob
|
||||
D.return_to_spawn()
|
||||
return
|
||||
mob.forceMove(get_step(mob, direct))
|
||||
mob.dir = direct
|
||||
//RS Port #658 End
|
||||
if(2)
|
||||
if(prob(50))
|
||||
var/locx
|
||||
|
||||
Reference in New Issue
Block a user