mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01:00
Merge pull request #16624 from Kashargul/RS_Ports
Ports RS 658, 661 and some minor things
This commit is contained in:
@@ -56,6 +56,8 @@ GLOBAL_LIST_EMPTY(areas_by_type)
|
||||
var/forbid_singulo = FALSE // If true singulo will not move in.
|
||||
var/no_spoilers = FALSE // If true, makes it much more difficult to see what is inside an area with things like mesons.
|
||||
var/soundproofed = FALSE // If true, blocks sounds from other areas and prevents hearers on other areas from hearing the sounds within.
|
||||
var/block_phase_shift = FALSE //Stops phase shifted mobs from entering // RS Port #658
|
||||
var/block_ghosts = FALSE //Stops ghosts from entering //RS Port #658
|
||||
|
||||
/area/New()
|
||||
// Used by the maploader, this must be done in New, not init
|
||||
@@ -398,6 +400,7 @@ var/list/mob/living/forced_ambiance_list = new
|
||||
play_ambience(L, initial = TRUE)
|
||||
if(no_spoilers)
|
||||
L.disable_spoiler_vision()
|
||||
check_phase_shift(M) //RS Port #658
|
||||
|
||||
/area/proc/play_ambience(var/mob/living/L, initial = TRUE)
|
||||
// Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
|
||||
@@ -554,3 +557,19 @@ GLOBAL_DATUM(spoiler_obfuscation_image, /image)
|
||||
add_overlay(GLOB.spoiler_obfuscation_image)
|
||||
else
|
||||
cut_overlay(GLOB.spoiler_obfuscation_image)
|
||||
|
||||
// RS Port #658 Start
|
||||
/area/proc/check_phase_shift(var/mob/ourmob)
|
||||
if(!block_phase_shift || !ourmob.incorporeal_move)
|
||||
return
|
||||
if(!isliving(ourmob))
|
||||
return
|
||||
if(isanimal(ourmob))
|
||||
var/mob/living/simple_mob/shadekin/SK = ourmob
|
||||
if(SK.ability_flags & AB_PHASE_SHIFTED)
|
||||
SK.phase_in(SK.loc)
|
||||
if(ishuman(ourmob))
|
||||
var/mob/living/carbon/human/SK = ourmob
|
||||
if(SK.ability_flags & AB_PHASE_SHIFTED)
|
||||
SK.phase_in(SK.loc)
|
||||
// RS Port #658 End
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
else
|
||||
var/datum/language/L = locate(href_list["default_lang"])
|
||||
if(L && (L in languages))
|
||||
set_default_language(L)
|
||||
apply_default_language(L)
|
||||
check_languages()
|
||||
return 1
|
||||
else if(href_list["set_lang_key"])
|
||||
|
||||
@@ -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
|
||||
@@ -76,19 +83,30 @@
|
||||
to_chat(src,span_warning("You can't use that here!"))
|
||||
return FALSE
|
||||
|
||||
forceMove(T)
|
||||
var/original_canmove = canmove
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob()
|
||||
if(pulledby)
|
||||
pulledby.stop_pulling()
|
||||
stop_pulling()
|
||||
canmove = FALSE
|
||||
|
||||
//Shifting in
|
||||
if(ability_flags & AB_PHASE_SHIFTED)
|
||||
phase_in(T)
|
||||
//Shifting out
|
||||
else
|
||||
phase_out(T)
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/phase_in(var/turf/T)
|
||||
if(ability_flags & AB_PHASE_SHIFTED)
|
||||
|
||||
// pre-change
|
||||
forceMove(T)
|
||||
var/original_canmove = canmove
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob()
|
||||
if(pulledby)
|
||||
pulledby.stop_pulling()
|
||||
stop_pulling()
|
||||
|
||||
// change
|
||||
canmove = FALSE
|
||||
ability_flags &= ~AB_PHASE_SHIFTED
|
||||
ability_flags |= AB_PHASE_SHIFTING
|
||||
mouse_opacity = 1
|
||||
@@ -137,8 +155,22 @@
|
||||
L.broken()
|
||||
else
|
||||
L.flicker(10)
|
||||
//Shifting out
|
||||
else
|
||||
|
||||
/mob/living/carbon/human/proc/phase_out(var/turf/T)
|
||||
if(!(ability_flags & AB_PHASE_SHIFTED))
|
||||
// pre-change
|
||||
forceMove(T)
|
||||
var/original_canmove = canmove
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob()
|
||||
if(pulledby)
|
||||
pulledby.stop_pulling()
|
||||
stop_pulling()
|
||||
canmove = FALSE
|
||||
|
||||
// change
|
||||
ability_flags |= AB_PHASE_SHIFTED
|
||||
ability_flags |= AB_PHASE_SHIFTING
|
||||
mouse_opacity = 0
|
||||
|
||||
@@ -1,23 +1,39 @@
|
||||
// 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
|
||||
|
||||
forceMove(T)
|
||||
var/original_canmove = canmove
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob()
|
||||
if(pulledby)
|
||||
pulledby.stop_pulling()
|
||||
stop_pulling()
|
||||
canmove = 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
|
||||
|
||||
//Shifting in
|
||||
if(ability_flags & AB_PHASE_SHIFTED)
|
||||
phase_in(T)
|
||||
//Shifting out
|
||||
else
|
||||
phase_out(T)
|
||||
|
||||
/mob/living/simple_mob/shadekin/proc/phase_in(var/turf/T)
|
||||
if(ability_flags & AB_PHASE_SHIFTED)
|
||||
|
||||
// pre-change
|
||||
forceMove(T)
|
||||
var/original_canmove = canmove
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob()
|
||||
if(pulledby)
|
||||
pulledby.stop_pulling()
|
||||
stop_pulling()
|
||||
canmove = FALSE
|
||||
|
||||
// change
|
||||
ability_flags &= ~AB_PHASE_SHIFTED
|
||||
mouse_opacity = 1
|
||||
name = real_name
|
||||
@@ -67,8 +83,22 @@
|
||||
else
|
||||
L.flicker(10)
|
||||
|
||||
//Shifting out
|
||||
else
|
||||
/mob/living/simple_mob/shadekin/proc/phase_out(var/turf/T)
|
||||
if(!(ability_flags & AB_PHASE_SHIFTED))
|
||||
|
||||
// pre-change
|
||||
forceMove(T)
|
||||
var/original_canmove = canmove
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob()
|
||||
if(pulledby)
|
||||
pulledby.stop_pulling()
|
||||
stop_pulling()
|
||||
canmove = FALSE
|
||||
|
||||
// change
|
||||
ability_flags |= AB_PHASE_SHIFTED
|
||||
mouse_opacity = 0
|
||||
custom_emote(1,"phases out!")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
if(direction == UP)
|
||||
var/obj/structure/lattice/lattice = locate() in destination.contents
|
||||
var/obj/structure/catwalk/catwalk = locate() in destination.contents
|
||||
var/turf/simulated/floor/water/deep/ocean/diving/surface = destination
|
||||
|
||||
if(lattice)
|
||||
var/pull_up_time = max((5 SECONDS + (src.movement_delay() * 10) * climb_modifier), 1)
|
||||
@@ -91,7 +90,7 @@
|
||||
to_chat(src, span_warning("You gave up on pulling yourself up."))
|
||||
return 0
|
||||
|
||||
else if(istype(surface))
|
||||
else if(istype(destination, /turf/simulated/floor/water/deep/ocean/diving))
|
||||
var/pull_up_time = max((5 SECONDS + (src.movement_delay() * 10) * swim_modifier), 1)
|
||||
to_chat(src, span_notice("You start swimming upwards..."))
|
||||
src.audible_message(span_notice("[src] begins to swim towards the surface."), runemessage = "splish splosh")
|
||||
@@ -116,6 +115,12 @@
|
||||
to_chat(src, span_warning("You gave up on pulling yourself up."))
|
||||
return 0
|
||||
|
||||
//RS Port #661 Start, Prevents noclipping
|
||||
else if(!istype(destination, /turf/simulated/open))
|
||||
to_chat(src, span_warning("Something solid above stops you from passing."))
|
||||
return 0
|
||||
//RS Port #661 End
|
||||
|
||||
else if(isliving(src)) //VOREStation Edit Start. Are they a mob, and are they currently flying??
|
||||
var/mob/living/H = src
|
||||
if(H.flying)
|
||||
|
||||
Reference in New Issue
Block a user