From fe431c8e469616eb94c46b921e41cee7bb387b82 Mon Sep 17 00:00:00 2001 From: Leshana Date: Wed, 17 Jan 2018 15:23:22 -0500 Subject: [PATCH] Trims back wilderness code that was dependent on tether map. * Reverted random.dm back to Polaris as there is no need for the VOREStation customs. * Fixed /obj/random/outside_mob so it will actually work (You can't set vars on a type!) * Removed all wilderness code outside of the tether map. It was only setting life_disabled on mobs spawning there. We can do that with a subsystem or by dynamic maploading instead. --- code/game/objects/mob_spawner_vr.dm | 1 - code/game/objects/random/random.dm | 9 ----- code/game/objects/random/random_vr.dm | 35 +++++++------------ .../living/simple_animal/aliens/alien_vr.dm | 32 ----------------- maps/RandomZLevels/zoo.dmm | 2 +- maps/tether/tether_defines.dm | 8 ++--- maps/tether/tether_things.dm | 22 ++---------- vorestation.dme | 1 - 8 files changed, 18 insertions(+), 92 deletions(-) delete mode 100644 code/modules/mob/living/simple_animal/aliens/alien_vr.dm diff --git a/code/game/objects/mob_spawner_vr.dm b/code/game/objects/mob_spawner_vr.dm index c464acdd083..e294c98053c 100644 --- a/code/game/objects/mob_spawner_vr.dm +++ b/code/game/objects/mob_spawner_vr.dm @@ -196,5 +196,4 @@ It also makes it so a ghost wont know where all the goodies/mobs are. icon_state = "alien_egg" spawn_types = list( /mob/living/simple_animal/hostile/alien/queen = 5, - /mob/living/simple_animal/hostile/alien/queen/large = 1 ) \ No newline at end of file diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm index e6f069c9a16..bb14c27d321 100644 --- a/code/game/objects/random/random.dm +++ b/code/game/objects/random/random.dm @@ -5,8 +5,6 @@ icon_state = "rup" var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything - var/spawned_thing //VOREStation Edit - // creates a new object and deletes itself /obj/random/New() @@ -30,13 +28,6 @@ A.pixel_x = pixel_x A.pixel_y = pixel_y -//VOREStation Edit - spawned_thing = A - -/obj/random/Destroy() - spawned_thing = null - return ..() -//VOREStation Edit End /obj/random/single name = "randomly spawned object" diff --git a/code/game/objects/random/random_vr.dm b/code/game/objects/random/random_vr.dm index b76d5d9fc57..0c58ffbf087 100644 --- a/code/game/objects/random/random_vr.dm +++ b/code/game/objects/random/random_vr.dm @@ -180,33 +180,22 @@ var/faction = "wild animal" /obj/random/outside_mob/item_to_spawn() // Special version for mobs to have the same faction. - var/mob = pick( + return pick( prob(50);/mob/living/simple_animal/retaliate/gaslamp, // prob(50);/mob/living/simple_animal/otie/feral, // Removed until Otie code is unfucked. prob(20);/mob/living/simple_animal/hostile/dino/virgo3b, prob(1);/mob/living/simple_animal/hostile/dragon/virgo3b) - if (istype(mob, /mob/living)) // This is just to prevent runtime errors in case some dev is a dumbass and puts invalid items into this. - var/mob/living/simple_animal/this_mob = mob + +/obj/random/outside_mob/spawn_item() + . = ..() + if(istype(., /mob/living/simple_animal)) + var/mob/living/simple_animal/this_mob = . this_mob.faction = src.faction if (this_mob.minbodytemp > 200) // Temporary hotfix. Eventually I'll add code to change all mob vars to fit the environment they are spawned in. this_mob.minbodytemp = 200 - return this_mob - else - return mob - -/obj/random/outside_mob/spawn_item() - ..() - var/datum/map_z_level/z_level = get_z_level_datum(spawned_thing) - if(!istype(z_level, /datum/map_z_level/tether/wilderness)) - return - if(!istype(spawned_thing, /mob/living/simple_animal)) - return - var/datum/map_z_level/tether/wilderness/wilderness = z_level - if(wilderness.activated) - return - var/mob/living/simple_animal/M = spawned_thing - wilderness.frozen_mobs += M - M.life_disabled = 1 - for(var/i = 1 to 20) //wander the mobs around so they aren't always in the same spots - step_rand(M) - sleep(2) \ No newline at end of file + //wander the mobs around so they aren't always in the same spots + var/turf/T = null + for(var/i = 1 to 20) + T = get_step_rand(this_mob) || T + if(T) + this_mob.forceMove(T) diff --git a/code/modules/mob/living/simple_animal/aliens/alien_vr.dm b/code/modules/mob/living/simple_animal/aliens/alien_vr.dm deleted file mode 100644 index 6595d7dd517..00000000000 --- a/code/modules/mob/living/simple_animal/aliens/alien_vr.dm +++ /dev/null @@ -1,32 +0,0 @@ -/mob/living/simple_animal/hostile/alien/proc/disable_for_wilderness() - var/datum/map_z_level/z_level = get_z_level_datum(src) - if(!istype(z_level, /datum/map_z_level/tether/wilderness)) - return - var/datum/map_z_level/tether/wilderness/wilderness = z_level - if(wilderness.activated) - return - life_disabled = 1 - wilderness.frozen_mobs += src - for(var/i = 1 to 20) - step_rand(src) - sleep(2) - -/mob/living/simple_animal/hostile/alien/wilderness_spawn/New() - ..() - disable_for_wilderness() - -/mob/living/simple_animal/hostile/alien/drone/wilderness_spawn/New() - ..() - disable_for_wilderness() - -/mob/living/simple_animal/hostile/alien/sentinel/wilderness_spawn/New() - ..() - disable_for_wilderness() - -/mob/living/simple_animal/hostile/alien/queen/wilderness_spawn/New() - ..() - disable_for_wilderness() - -/mob/living/simple_animal/hostile/alien/queen/large/wilderness_spawn/New() - ..() - disable_for_wilderness() \ No newline at end of file diff --git a/maps/RandomZLevels/zoo.dmm b/maps/RandomZLevels/zoo.dmm index edede57b18e..a3052966e3a 100644 --- a/maps/RandomZLevels/zoo.dmm +++ b/maps/RandomZLevels/zoo.dmm @@ -965,7 +965,7 @@ "sC" = (/obj/effect/spider/cocoon{tag = "icon-cocoon2"; icon_state = "cocoon2"},/mob/living/simple_animal/hostile/giant_spider/nurse{faction = "zoo"},/turf/simulated/floor/holofloor/desert,/area/awaymission/zoo) "sD" = (/obj/effect/spider/stickyweb{tag = "icon-cobweb2"; icon_state = "cobweb2"},/mob/living/simple_animal/hostile/giant_spider{faction = "zoo"},/turf/simulated/floor/holofloor/desert,/area/awaymission/zoo) "sE" = (/obj/effect/spider/stickyweb{tag = "icon-stickyweb2"; icon_state = "stickyweb2"},/obj/effect/spider/cocoon{tag = "icon-cocoon_large1"; icon_state = "cocoon_large1"},/mob/living/simple_animal/hostile/giant_spider{faction = "zoo"},/turf/simulated/floor/holofloor/desert,/area/awaymission/zoo) -"sF" = (/obj/effect/floor_decal/spline{icon = 'icons/turf/floors.dmi'; icon_state = "asteroid_edge_e"; name = "rocky edge"},/mob/living/simple_animal/hostile/alien/queen/large{faction = "zoo"},/turf/simulated/floor/holofloor/desert{icon = 'icons/turf/floors.dmi'; icon_state = "asteroidplating"; name = "scorched sand"},/area/awaymission/zoo) +"sF" = (/obj/effect/floor_decal/spline{icon = 'icons/turf/floors.dmi'; icon_state = "asteroid_edge_e"; name = "rocky edge"},/mob/living/simple_animal/hostile/alien/queen{faction = "zoo"},/turf/simulated/floor/holofloor/desert{icon = 'icons/turf/floors.dmi'; icon_state = "asteroidplating"; name = "scorched sand"},/area/awaymission/zoo) "sG" = (/obj/effect/landmark/away,/turf/simulated/floor/tiled/neutral,/area/awaymission/zoo) "sH" = (/obj/effect/spider/cocoon{tag = "icon-cocoon_large3"; icon_state = "cocoon_large3"},/mob/living/simple_animal/hostile/giant_spider/hunter{faction = "zoo"},/turf/simulated/floor/holofloor/desert,/area/awaymission/zoo) "sI" = (/mob/living/simple_animal/hostile/giant_spider{faction = "zoo"},/turf/simulated/floor/holofloor/desert,/area/awaymission/zoo) diff --git a/maps/tether/tether_defines.dm b/maps/tether/tether_defines.dm index 13454b9b3ab..e132e7dc9a8 100644 --- a/maps/tether/tether_defines.dm +++ b/maps/tether/tether_defines.dm @@ -249,6 +249,7 @@ flags = MAP_LEVEL_PLAYER transit_chance = 82 +/* /datum/map_z_level/tether/wilderness name = "Wilderness" flags = MAP_LEVEL_PLAYER @@ -287,9 +288,4 @@ /datum/map_z_level/tether/wilderness/wild_ruins z = Z_LEVEL_SURFACE_WILDERNESS_RUINS - -/proc/get_z_level_datum(atom/A) - var/turf/T = get_turf(A) - var/datum/map_z_level/z_level = using_map.zlevels["[T.z]"] - if(z_level) - return z_level \ No newline at end of file +*/ diff --git a/maps/tether/tether_things.dm b/maps/tether/tether_things.dm index 9fa60553b93..819e1440078 100644 --- a/maps/tether/tether_things.dm +++ b/maps/tether/tether_things.dm @@ -76,25 +76,9 @@ else teleport_y = src.y -/obj/effect/step_trigger/teleporter/wild/Trigger(var/atom/movable/A) - ..() - var/datum/map_z_level/z_level = get_z_level_datum(A) - if(!istype(z_level, /datum/map_z_level/tether/wilderness)) - return - var/datum/map_z_level/tether/wilderness/wilderness = z_level - if(wilderness.activated) - return - if(isliving(A)) - var/mob/living/M = A - if(!M.is_dead() && M.client) - wilderness.activate_mobs() - return - for(var/mob/living/M in A) - if(!istype(M)) - continue - if(!M.is_dead() && M.client) - wilderness.activate_mobs() - return +// Here we would activate the target wilderness z-level. +// /obj/effect/step_trigger/teleporter/wild/Trigger(var/atom/movable/A) +// ..() /obj/effect/step_trigger/teleporter/wild/from_wild ..() diff --git a/vorestation.dme b/vorestation.dme index ba81030f306..2736dcae82b 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2046,7 +2046,6 @@ #include "code\modules\mob\living\simple_animal\simple_animal.dm" #include "code\modules\mob\living\simple_animal\simple_animal_vr.dm" #include "code\modules\mob\living\simple_animal\aliens\alien.dm" -#include "code\modules\mob\living\simple_animal\aliens\alien_vr.dm" #include "code\modules\mob\living\simple_animal\aliens\creature.dm" #include "code\modules\mob\living\simple_animal\aliens\drone.dm" #include "code\modules\mob\living\simple_animal\aliens\faithless.dm"