mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] ignore light recalc in shuttles and elevators (#10559)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
531f562957
commit
5b42b1ffd8
@@ -67,8 +67,8 @@
|
|||||||
//#define isturf(D) istype(D, /turf) //Built in
|
//#define isturf(D) istype(D, /turf) //Built in
|
||||||
#define isopenspace(A) istype(A, /turf/simulated/open)
|
#define isopenspace(A) istype(A, /turf/simulated/open)
|
||||||
#define isspace(A) istype(A, /turf/space)
|
#define isspace(A) istype(A, /turf/space)
|
||||||
#define isopenturf(A) istype(A, /turf/simulated/open) || istype(A, /turf/space)
|
#define isopenturf(A) (istype(A, /turf/simulated/open) || istype(A, /turf/space))
|
||||||
#define isnonsolidturf(A) istype(A, /turf/simulated/open) || istype(A, /turf/space) || istype(A, /turf/simulated/floor/water) || istype(A, /turf/simulated/floor/lava)
|
#define isnonsolidturf(A) (istype(A, /turf/simulated/open) || istype(A, /turf/space) || istype(A, /turf/simulated/floor/water) || istype(A, /turf/simulated/floor/lava))
|
||||||
#define ismineralturf(A) istype(A, /turf/simulated/mineral)
|
#define ismineralturf(A) istype(A, /turf/simulated/mineral)
|
||||||
|
|
||||||
#define istaurtail(A) istype(A, /datum/sprite_accessory/tail/taur)
|
#define istaurtail(A) istype(A, /datum/sprite_accessory/tail/taur)
|
||||||
|
|||||||
@@ -258,9 +258,9 @@
|
|||||||
var/mob/living/carbon/human/hume
|
var/mob/living/carbon/human/hume
|
||||||
|
|
||||||
/obj/item/cell/standin/Initialize(mapload, var/mob/living/carbon/human/H)
|
/obj/item/cell/standin/Initialize(mapload, var/mob/living/carbon/human/H)
|
||||||
|
. = ..()
|
||||||
if(!istype(H))
|
if(!istype(H))
|
||||||
return INITIALIZE_HINT_QDEL
|
return INITIALIZE_HINT_QDEL
|
||||||
. = ..()
|
|
||||||
hume = H
|
hume = H
|
||||||
charge = H.nutrition
|
charge = H.nutrition
|
||||||
maxcharge = initial(H.nutrition)
|
maxcharge = initial(H.nutrition)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
/obj/structure/lattice/Initialize(mapload)
|
/obj/structure/lattice/Initialize(mapload)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/open) || istype(src.loc, /turf/simulated/mineral) || istype(src.loc, /turf/simulated/shuttle/plating/airless/carry)))
|
if(!(isopenturf(src.loc) || istype(src.loc, /turf/simulated/mineral) || istype(src.loc, /turf/simulated/shuttle/plating/airless/carry)))
|
||||||
return INITIALIZE_HINT_QDEL
|
return INITIALIZE_HINT_QDEL
|
||||||
|
|
||||||
for(var/obj/structure/lattice/LAT in src.loc)
|
for(var/obj/structure/lattice/LAT in src.loc)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
// Patch holes in the ceiling
|
// Patch holes in the ceiling
|
||||||
if(T)
|
if(T)
|
||||||
if(istype(T, /turf/simulated/open) || istype(T, /turf/space))
|
if(isopenturf(T))
|
||||||
// Must be build adjacent to an existing floor/wall, no floating floors
|
// Must be build adjacent to an existing floor/wall, no floating floors
|
||||||
var/list/cardinalTurfs = list() // Up a Z level
|
var/list/cardinalTurfs = list() // Up a Z level
|
||||||
for(var/dir in cardinal)
|
for(var/dir in cardinal)
|
||||||
|
|||||||
@@ -170,7 +170,7 @@
|
|||||||
|
|
||||||
// Place plating over a wall
|
// Place plating over a wall
|
||||||
if(T)
|
if(T)
|
||||||
if(istype(T, /turf/simulated/open) || istype(T, /turf/space))
|
if(isopenturf(T))
|
||||||
if(R.use(1)) // Cost of roofing tiles is 1:1 with cost to place lattice and plating
|
if(R.use(1)) // Cost of roofing tiles is 1:1 with cost to place lattice and plating
|
||||||
T.ReplaceWithLattice()
|
T.ReplaceWithLattice()
|
||||||
T.ChangeTurf(/turf/simulated/floor, preserve_outdoors = TRUE)
|
T.ChangeTurf(/turf/simulated/floor, preserve_outdoors = TRUE)
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
// Patch holes in the ceiling
|
// Patch holes in the ceiling
|
||||||
if(T)
|
if(T)
|
||||||
if(istype(T, /turf/simulated/open) || istype(T, /turf/space))
|
if(isopenturf(T))
|
||||||
// Must be build adjacent to an existing floor/wall, no floating floors
|
// Must be build adjacent to an existing floor/wall, no floating floors
|
||||||
var/turf/simulated/A = locate(/turf/simulated/floor) in T.CardinalTurfs()
|
var/turf/simulated/A = locate(/turf/simulated/floor) in T.CardinalTurfs()
|
||||||
if(!A)
|
if(!A)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
var/old_dynamic_lumcount = dynamic_lumcount
|
var/old_dynamic_lumcount = dynamic_lumcount
|
||||||
var/oldtype = src.type
|
var/oldtype = src.type
|
||||||
var/old_density = src.density
|
var/old_density = src.density
|
||||||
var/was_open = istype(src,/turf/simulated/open)
|
var/was_open = isopenturf(src)
|
||||||
var/datum/sunlight_handler/old_shandler
|
var/datum/sunlight_handler/old_shandler
|
||||||
var/turf/simulated/simself = src
|
var/turf/simulated/simself = src
|
||||||
if(istype(simself) && simself.shandler)
|
if(istype(simself) && simself.shandler)
|
||||||
@@ -141,24 +141,26 @@
|
|||||||
if(SUNLIGHT_ONLY_SHADE)
|
if(SUNLIGHT_ONLY_SHADE)
|
||||||
vis_contents += sim_self.shandler.pshandler.vis_shade
|
vis_contents += sim_self.shandler.pshandler.vis_shade
|
||||||
|
|
||||||
var/is_open = istype(W,/turf/simulated/open)
|
var/is_open = isopenturf(W)
|
||||||
|
|
||||||
|
|
||||||
propogate_sunlight_changes(oldtype, old_density, W)
|
|
||||||
var/turf/simulated/cur_turf = src
|
var/turf/simulated/cur_turf = src
|
||||||
if(istype(cur_turf))
|
if(istype(cur_turf))
|
||||||
|
var/area/A = cur_turf.loc
|
||||||
|
if(is_outdoors() && !A.isAlwaysIndoors())
|
||||||
|
propogate_sunlight_changes(oldtype, old_density, W)
|
||||||
if(is_open != was_open)
|
if(is_open != was_open)
|
||||||
do
|
do
|
||||||
cur_turf = GetBelow(cur_turf)
|
cur_turf = GetBelow(cur_turf)
|
||||||
if(!istype(cur_turf, /turf/simulated))
|
if(!istype(cur_turf, /turf/simulated))
|
||||||
break
|
break
|
||||||
var/area/A = cur_turf.loc
|
A = cur_turf.loc
|
||||||
if(is_open && !A.isAlwaysIndoors())
|
if(is_open && !A.isAlwaysIndoors())
|
||||||
cur_turf.make_outdoors()
|
cur_turf.make_outdoors()
|
||||||
|
cur_turf.propogate_sunlight_changes(oldtype, old_density, W, above = TRUE)
|
||||||
else
|
else
|
||||||
cur_turf.make_indoors()
|
cur_turf.make_indoors()
|
||||||
cur_turf.propogate_sunlight_changes(oldtype, old_density, W, above = TRUE)
|
while(isopenturf(cur_turf) && HasBelow(cur_turf.z))
|
||||||
while(istype(cur_turf,/turf/simulated/open) && HasBelow(cur_turf.z))
|
|
||||||
|
|
||||||
if(old_shandler) old_shandler.holder_change()
|
if(old_shandler) old_shandler.holder_change()
|
||||||
if(preserve_outdoors)
|
if(preserve_outdoors)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
/obj/effect/meteor_falling/proc/meteor_fall()
|
/obj/effect/meteor_falling/proc/meteor_fall()
|
||||||
var/turf/current = get_turf(src)
|
var/turf/current = get_turf(src)
|
||||||
if(istype(current, /turf/simulated/open) || istype(current, /turf/space))
|
if(isopenturf(current))
|
||||||
var/turf/below = GetBelow(src)
|
var/turf/below = GetBelow(src)
|
||||||
if(below.density)
|
if(below.density)
|
||||||
meteor_impact()
|
meteor_impact()
|
||||||
|
|||||||
@@ -83,31 +83,27 @@
|
|||||||
/obj/effect/plant/single
|
/obj/effect/plant/single
|
||||||
spread_chance = 0
|
spread_chance = 0
|
||||||
|
|
||||||
/obj/effect/plant/New(var/newloc, var/datum/seed/newseed, var/obj/effect/plant/newparent)
|
/obj/effect/plant/Initialize(mapload, var/datum/seed/newseed, var/obj/effect/plant/newparent)
|
||||||
|
. = ..()
|
||||||
//VOREStation Edit Start
|
//VOREStation Edit Start
|
||||||
if(istype(loc, /turf/simulated/open))
|
if(isopenturf(loc))
|
||||||
qdel(src)
|
return INITIALIZE_HINT_QDEL
|
||||||
//VOREStation Edit End
|
//VOREStation Edit End
|
||||||
..()
|
|
||||||
|
|
||||||
if(!newparent)
|
if(!newparent)
|
||||||
parent = src
|
parent = src
|
||||||
else
|
else
|
||||||
parent = newparent
|
parent = newparent
|
||||||
|
|
||||||
if(!SSplants)
|
|
||||||
sleep(250) // ugly hack, should mean roundstart plants are fine. TODO initialize perhaps?
|
|
||||||
if(!SSplants)
|
if(!SSplants)
|
||||||
to_world(span_danger("Plant controller does not exist and [src] requires it. Aborting."))
|
to_world(span_danger("Plant controller does not exist and [src] requires it. Aborting."))
|
||||||
qdel(src)
|
return INITIALIZE_HINT_QDEL
|
||||||
return
|
|
||||||
|
|
||||||
if(!istype(newseed))
|
if(!istype(newseed))
|
||||||
newseed = SSplants.seeds[DEFAULT_SEED]
|
newseed = SSplants.seeds[DEFAULT_SEED]
|
||||||
seed = newseed
|
seed = newseed
|
||||||
if(!seed)
|
if(!seed)
|
||||||
qdel(src)
|
return INITIALIZE_HINT_QDEL
|
||||||
return
|
|
||||||
|
|
||||||
name = seed.display_name
|
name = seed.display_name
|
||||||
max_health = round(seed.get_trait(TRAIT_ENDURANCE)/2)
|
max_health = round(seed.get_trait(TRAIT_ENDURANCE)/2)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
for(var/check_dir in cardinal)
|
for(var/check_dir in cardinal)
|
||||||
var/turf/simulated/T = get_step(get_turf(src), check_dir)
|
var/turf/simulated/T = get_step(get_turf(src), check_dir)
|
||||||
//VOREStation Edit Start - Vines can go up/down stairs, but don't register that they have done this, so do so infinitely, which is annoying and laggy.
|
//VOREStation Edit Start - Vines can go up/down stairs, but don't register that they have done this, so do so infinitely, which is annoying and laggy.
|
||||||
if(istype(T) && !istype(check_dir, /turf/simulated/open)) //Let's not have them go on open space where you can't really get to them.
|
if(istype(T) && !isopenturf(check_dir)) //Let's not have them go on open space where you can't really get to them.
|
||||||
cardinal_neighbors |= T
|
cardinal_neighbors |= T
|
||||||
//VOREStation Edit End
|
//VOREStation Edit End
|
||||||
return cardinal_neighbors
|
return cardinal_neighbors
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
//Instead, they are created at their parent and then move to their destination.
|
//Instead, they are created at their parent and then move to their destination.
|
||||||
/obj/effect/plant/proc/spread_to(turf/target_turf)
|
/obj/effect/plant/proc/spread_to(turf/target_turf)
|
||||||
//VOREStation Edit Start - Vines can go up/down stairs, but don't register that they have done this, so do so infinitely, which is annoying and laggy.
|
//VOREStation Edit Start - Vines can go up/down stairs, but don't register that they have done this, so do so infinitely, which is annoying and laggy.
|
||||||
if(istype(target_turf, /turf/simulated/open))
|
if(isopenturf(target_turf))
|
||||||
return
|
return
|
||||||
//VOREStation Edit End
|
//VOREStation Edit End
|
||||||
var/obj/effect/plant/child = new(get_turf(src),seed,parent)
|
var/obj/effect/plant/child = new(get_turf(src),seed,parent)
|
||||||
|
|||||||
@@ -51,11 +51,9 @@
|
|||||||
icon_state = "blank"
|
icon_state = "blank"
|
||||||
|
|
||||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/Initialize(mapload,var/datum/seed/newseed)
|
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/Initialize(mapload,var/datum/seed/newseed)
|
||||||
//VOREStation Addition Start
|
|
||||||
if(istype(loc, /turf/simulated/open) || istype(loc, /turf/space))
|
|
||||||
return INITIALIZE_HINT_QDEL
|
|
||||||
//VOREStation Addition End
|
|
||||||
. = ..()
|
. = ..()
|
||||||
|
if(isopenturf(loc))
|
||||||
|
return INITIALIZE_HINT_QDEL
|
||||||
seed = newseed
|
seed = newseed
|
||||||
dead = 0
|
dead = 0
|
||||||
age = 1
|
age = 1
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
if(((SSplanets && SSplanets.z_to_planet.len >= z && SSplanets.z_to_planet[z]) || SSlighting.get_pshandler_z(z)) && has_dynamic_lighting()) //Only for planet turfs or fakesuns that specify they want to use this system
|
if(((SSplanets && SSplanets.z_to_planet.len >= z && SSplanets.z_to_planet[z]) || SSlighting.get_pshandler_z(z)) && has_dynamic_lighting()) //Only for planet turfs or fakesuns that specify they want to use this system
|
||||||
if(is_outdoors())
|
if(is_outdoors())
|
||||||
var/turf/T = GetAbove(src)
|
var/turf/T = GetAbove(src)
|
||||||
if(T && !istype(T,/turf/simulated/open))
|
if(T && !isopenturf(T) && (SSplanets.z_to_planet.len >= T.z && SSplanets.z_to_planet[T.z]))
|
||||||
make_indoors()
|
make_indoors()
|
||||||
if(!shandler_noinit)
|
if(!shandler_noinit)
|
||||||
shandler = new(src)
|
shandler = new(src)
|
||||||
|
|||||||
@@ -651,7 +651,7 @@
|
|||||||
var/area/TA = null // Variable for area checking. Defining it here so memory does not have to be allocated repeatedly.
|
var/area/TA = null // Variable for area checking. Defining it here so memory does not have to be allocated repeatedly.
|
||||||
for(var/turf/T in trange(field_radius, gen_turf))
|
for(var/turf/T in trange(field_radius, gen_turf))
|
||||||
// Don't expand to space or on shuttle areas.
|
// Don't expand to space or on shuttle areas.
|
||||||
if(istype(T, /turf/space) || istype(T, /turf/simulated/open))
|
if(isopenturf(T))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
// Find adjacent space/shuttle tiles and cover them. Shuttles won't be blocked if shield diffuser is mapped in and turned on.
|
// Find adjacent space/shuttle tiles and cover them. Shuttles won't be blocked if shield diffuser is mapped in and turned on.
|
||||||
|
|||||||
Reference in New Issue
Block a user