The Mapping Update

Cleans up the map (again)
Makes mining code more better
This commit is contained in:
Letter N
2021-03-12 12:11:35 +08:00
parent cc81a6d65e
commit 935e46b492
149 changed files with 206322 additions and 206270 deletions
@@ -88,7 +88,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
/mob/camera/blob/proc/is_valid_turf(turf/T)
var/area/A = get_area(T)
if((A && !A.blob_allowed) || !T || !is_station_level(T.z) || isspaceturf(T))
if((A && !(A.area_flags & BLOBS_ALLOWED)) || !T || !is_station_level(T.z) || isspaceturf(T))
return FALSE
return TRUE
@@ -131,7 +131,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
var/area/Ablob = get_area(T)
if(!Ablob.blob_allowed)
if(!(Ablob.area_flags & BLOBS_ALLOWED))
continue
if(!(ROLE_BLOB in L.faction))
@@ -144,7 +144,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
for(var/area/A in GLOB.sortedAreas)
if(!(A.type in GLOB.the_station_areas))
continue
if(!A.blob_allowed)
if(!(A.area_flags & BLOBS_ALLOWED))
continue
A.color = blobstrain.color
A.name = "blob"
+1 -1
View File
@@ -211,7 +211,7 @@
to_chat(src, "<span class='userdanger'>You have no core and are about to die! May you rest in peace.</span>")
return
var/area/A = get_area(T)
if(isspaceturf(T) || A && !A.blob_allowed)
if(isspaceturf(T) || A && !(A.area_flags & BLOBS_ALLOWED))
to_chat(src, "<span class='warning'>You cannot relocate your core here!</span>")
return
if(!can_buy(80))
@@ -25,7 +25,7 @@
if(owner_overmind)
overmind = owner_overmind
var/area/Ablob = get_area(src)
if(Ablob.blob_allowed) //Is this area allowed for winning as blob?
if(Ablob.area_flags & BLOBS_ALLOWED) //Is this area allowed for winning as blob?
overmind.blobs_legit += src
GLOB.blobs += src //Keep track of the blob in the normal list either way
setDir(pick(GLOB.cardinals))
@@ -37,7 +37,7 @@
lastWarning = world.time
to_chat(src, "<span class='warning'>This turf is consecrated and can't be crossed!</span>")
return
if(istype(get_area(T), /area/chapel))
if(istype(get_area(T), /area/service/chapel))
if((world.time - lastWarning) >= 30)
lastWarning = world.time
to_chat(src, "<span class='warning'>The Chapel is hallowed ground under a heretical deity, and can't be accessed!</span>")
@@ -24,7 +24,8 @@
/datum/clockwork_scripture/create_object/stargazer/check_special_requirements()
var/area/A = get_area(invoker)
if(A.outdoors || A.map_name == "Space" || !A.blob_allowed)
var/turf/T = get_turf(invoker)
if(!is_station_level(invoker.z) || isspaceturf(T) || !(A.area_flags & VALID_TERRITORY))
to_chat(invoker, "<span class='danger'>Stargazers can't be built off-station.</span>")
return
return ..()
@@ -34,7 +34,7 @@
return FALSE
var/area/A = get_area(invoker)
var/turf/T = get_turf(invoker)
if(!T || !is_station_level(T.z) || istype(A, /area/shuttle) || !A.blob_allowed)
if(!is_station_level(T.z) || isspaceturf(T) || !(A.area_flags & VALID_TERRITORY) || isshuttleturf(T))
to_chat(invoker, "<span class='warning'>You must be on the station to activate the Ark!</span>")
return FALSE
if(GLOB.clockwork_gateway_activated)
@@ -52,7 +52,7 @@
break
if(has_starlight && anchored)
var/area/A = get_area(src)
if(A.outdoors || A.map_name == "Space" || !A.blob_allowed)
if(A.outdoors || A.map_name == "Space" || !(A.area_flags & VALID_TERRITORY))
has_starlight = FALSE
if(old_status != has_starlight)
if(has_starlight)
+1 -1
View File
@@ -419,7 +419,7 @@
var/sanity = 0
while(summon_spots.len < SUMMON_POSSIBILITIES && sanity < 100)
var/area/summon = pick(GLOB.sortedAreas - summon_spots)
if(summon && is_station_level(summon.z) && summon.valid_territory)
if(summon && is_station_level(summon.z) && !(summon.area_flags & VALID_TERRITORY))
summon_spots += summon
sanity++
update_explanation_text()
+1 -1
View File
@@ -148,7 +148,7 @@ This file contains the cult dagger and rune list code
to_chat(user, "<span class='cult'>There is already a rune here.</span>")
return FALSE
var/area/A = get_area(T)
if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !A.blob_allowed))
if((!is_station_level(T.z) && !is_mining_level(T.z)) || !(A?.area_flags & VALID_TERRITORY))
to_chat(user, "<span class='warning'>The veil is not weak enough here.</span>")
return FALSE
return TRUE
+47 -31
View File
@@ -261,19 +261,26 @@
S.DisIntegrate(src)
return TRUE
/obj/machinery/door/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
var/isonshuttle = istype(get_area(src), /area/shuttle)
for(var/turf/T in range(1, src))
var/area/A = get_area(T)
if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle)))
to_chat(S, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
S.target = null
/obj/machinery/door/swarmer_act(mob/living/simple_animal/hostile/swarmer/actor)
var/is_on_shuttle = istype(get_area(src), /area/shuttle)
for(var/turf/turf_in_range in range(1, src))
var/area/turf_area = get_area(turf_in_range)
//Check for dangerous pressure differences
// if (turf_in_range.return_turf_delta_p() > DANGEROUS_DELTA_P)
// to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause an explosive pressure release. Aborting.</span>")
// actor.target = null
// return TRUE
//Check if breaking this door will expose the station to space/planetary atmos
if(isspaceturf(turf_in_range) || (!is_on_shuttle && (istype(turf_area, /area/shuttle) || istype(turf_area, /area/space))) || (is_on_shuttle && !istype(turf_area, /area/shuttle)))
to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
actor.target = null
return FALSE
else if(istype(A, /area/engine/supermatter))
to_chat(S, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
S.target = null
//Check if this door is important in supermatter containment
else if(istype(turf_area, /area/engineering/supermatter))
to_chat(actor, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
actor.target = null
return FALSE
S.DisIntegrate(src)
actor.DisIntegrate(src)
return TRUE
/obj/machinery/camera/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
@@ -342,31 +349,40 @@
to_chat(S, "<span class='warning'>This bluespace source will be important to us later. Aborting.</span>")
return FALSE
/turf/closed/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
var/isonshuttle = istype(loc, /area/shuttle)
for(var/turf/T in range(1, src))
var/area/A = get_area(T)
if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle)))
to_chat(S, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
S.target = null
/turf/closed/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/actor)
var/is_on_shuttle = istype(loc, /area/shuttle)
for(var/turf/turf_in_range in range(1, src))
var/area/turf_area = get_area(turf_in_range)
// if (turf_in_range.return_turf_delta_p() > DANGEROUS_DELTA_P)
// to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause an explosive pressure release. Aborting.</span>")
// actor.target = null
// return TRUE
if(isspaceturf(turf_in_range) || (!is_on_shuttle && (istype(turf_area, /area/shuttle) || istype(turf_area, /area/space))) || (is_on_shuttle && !istype(turf_area, /area/shuttle)))
to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
actor.target = null
return TRUE
else if(istype(A, /area/engine/supermatter))
to_chat(S, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
S.target = null
else if(istype(turf_area, /area/engineering/supermatter))
to_chat(actor, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
actor.target = null
return TRUE
return ..()
/obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
var/isonshuttle = istype(get_area(src), /area/shuttle)
for(var/turf/T in range(1, src))
var/area/A = get_area(T)
if(isspaceturf(T) || (!isonshuttle && (istype(A, /area/shuttle) || istype(A, /area/space))) || (isonshuttle && !istype(A, /area/shuttle)))
to_chat(S, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
S.target = null
/obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/actor)
var/is_on_shuttle = istype(get_area(src), /area/shuttle)
for(var/t in RANGE_TURFS(1, src))
var/turf/turf_in_range = t
var/area/turf_area = get_area(turf_in_range)
// if (turf_in_range.return_turf_delta_p() > DANGEROUS_DELTA_P)
// to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause an explosive pressure release. Aborting.</span>")
// actor.target = null
// return TRUE
if(isspaceturf(turf_in_range) || (!is_on_shuttle && (istype(turf_area, /area/shuttle) || istype(turf_area, /area/space))) || (is_on_shuttle && !istype(turf_area, /area/shuttle)))
to_chat(actor, "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>")
actor.target = null
return TRUE
else if(istype(A, /area/engine/supermatter))
to_chat(S, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
S.target = null
else if(istype(turf_area, /area/engineering/supermatter))
to_chat(actor, "<span class='warning'>Disrupting the containment of a supermatter crystal would not be to our benefit. Aborting.</span>")
actor.target = null
return TRUE
return ..()
@@ -385,14 +385,10 @@
/obj/item/warpwhistle/attack_self(mob/living/carbon/user)
if(!istype(user) || on_cooldown)
return
var/turf/T = get_turf(user)
var/area/A = get_area(user)
if(!T || !A || A.noteleport)
to_chat(user, "<span class='warning'>You play \the [src], yet no sound comes out of it... Looks like it won't work here.</span>")
return
on_cooldown = TRUE
last_user = user
playsound(T,'sound/magic/warpwhistle.ogg', 200, 1)
var/turf/T = get_turf(user)
playsound(T,'sound/magic/warpwhistle.ogg', 200, TRUE)
ADD_TRAIT(user, TRAIT_MOBILITY_NOMOVE, src)
ADD_TRAIT(user, TRAIT_MOBILITY_NOUSE, src)
ADD_TRAIT(user, TRAIT_MOBILITY_NOPICKUP, src)
@@ -400,6 +396,10 @@
new /obj/effect/temp_visual/tornado(T)
sleep(20)
if(interrupted(user))
REMOVE_TRAIT(user, TRAIT_MOBILITY_NOMOVE, src)
REMOVE_TRAIT(user, TRAIT_MOBILITY_NOUSE, src)
REMOVE_TRAIT(user, TRAIT_MOBILITY_NOPICKUP, src)
user.update_mobility()
return
user.invisibility = INVISIBILITY_MAXIMUM
user.status_flags |= GODMODE
@@ -427,8 +427,7 @@
if(interrupted(user))
return
on_cooldown = 2
sleep(40)
on_cooldown = 0
addtimer(VARSET_CALLBACK(src, on_cooldown, 0), 4 SECONDS)
/obj/item/warpwhistle/Destroy()
if(on_cooldown == 1 && last_user) //Flute got dunked somewhere in the teleport