Merge pull request #11288 from PsiOmegaDelta/151310-RandomBlob

Blob spawn locations are now more random
This commit is contained in:
Chinsky
2015-10-14 03:24:28 +03:00
13 changed files with 79 additions and 46 deletions
+4 -1
View File
@@ -1,6 +1,9 @@
/mob/var/lastattacker = null
/mob/var/lastattacked = null
/mob/var/attack_log = list( )
/mob/var/attack_log = list()
proc/log_and_message_admins_with_location(var/message, var/x, var/y, var/z, var/mob/user = usr)
log_and_message_admins("[message] (<a HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)", user)
proc/log_and_message_admins(var/message as text, var/mob/user = usr)
log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]")
+4 -2
View File
@@ -1,6 +1,5 @@
/datum/event/blob
announceWhen = 12
endWhen = 120
var/obj/effect/blob/core/Blob
@@ -8,10 +7,13 @@
level_seven_announcement()
/datum/event/blob/start()
var/turf/T = pick(blobstart)
var/turf/T = pick_area_turf(/area/maintenance, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects))
if(!T)
log_and_message_admins("Blob failed to find a viable turf.")
kill()
return
log_and_message_admins_with_location("Event: Blob spawned at \the [get_area(T)] ([T.x],[T.y],[T.z])", T.x, T.y, T.z)
Blob = new /obj/effect/blob/core(T)
for(var/i = 1; i < rand(3, 4), i++)
Blob.process()
@@ -3,15 +3,8 @@
/proc/spacevine_infestation(var/potency_min=70, var/potency_max=100, var/maturation_min=5, var/maturation_max=15)
spawn() //to stop the secrets panel hanging
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
for(var/areapath in typesof(/area/hallway))
var/area/A = locate(areapath)
for(var/turf/simulated/floor/F in A.contents)
if(turf_clear(F))
turfs += F
if(turfs.len) //Pick a turf to spawn at if we can
var/turf/simulated/floor/T = pick(turfs)
var/turf/T = pick_area_turf(/area/hallway, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects))
if(T)
var/datum/seed/seed = plant_controller.create_random_seed(1)
seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines.
seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects.
@@ -23,9 +16,9 @@
vine.mature_time = 0
vine.process()
message_admins("<span class='notice'>Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])</span>")
log_and_message_admins_with_location("Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])", T.x, T.y, T.z)
return
message_admins("<span class='notice'>Event: Spacevines failed to find a viable turf.</span>")
log_and_message_admins("<span class='notice'>Event: Spacevines failed to find a viable turf.</span>")
/obj/effect/dead_plant
anchored = 1