mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-04 13:20:15 +00:00
Attempted wilderness performance increase (#1841)
* Attempted wilderness performance increase * might as well * Edit comments * Moves alien change out of polaris file
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
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()
|
||||
@@ -28,6 +30,13 @@
|
||||
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"
|
||||
|
||||
@@ -193,4 +193,21 @@
|
||||
this_mob.minbodytemp = 200
|
||||
return this_mob
|
||||
else
|
||||
return mob
|
||||
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)
|
||||
Reference in New Issue
Block a user