This commit is contained in:
Zuhayr
2013-12-22 23:13:22 +10:30
4 changed files with 22 additions and 19 deletions

View File

@@ -50,7 +50,7 @@ datum/controller/game_controller/New()
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
if(!ticker) ticker = new /datum/controller/gameticker()
if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
if(artifact_spawn) artifact_spawning_turfs = artifact_spawn
datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag

View File

@@ -5,6 +5,7 @@
#define ARTIFACT_SPAWN_CHANCE 20
/datum/controller/game_controller/var/list/artifact_spawning_turfs = list()
/var/global/list/artifact_spawn = list() // Runtime fix for geometry loading before controller is instantiated.
/turf/simulated/mineral //wall piece
name = "Rock"
@@ -129,7 +130,7 @@
//dont create artifact machinery in animal or plant digsites, or if we already have one
if(!artifact_find && digsite != 1 && digsite != 2 && prob(ARTIFACT_SPAWN_CHANCE))
artifact_find = new()
master_controller.artifact_spawning_turfs.Add(src)
artifact_spawn.Add(src)
if(!src.geological_data)
src.geological_data = new/datum/geosample(src)

View File

@@ -126,6 +126,7 @@
artifact_distance = rand()
artifact_id = container.artifact_find.artifact_id
else
if(master_controller) //Sanity check due to runtimes ~Z
for(var/turf/simulated/mineral/T in master_controller.artifact_spawning_turfs)
if(T.artifact_find)
var/cur_dist = get_dist(container, T) * 2

View File

@@ -36,6 +36,7 @@
last_scan_time = world.time
nearest_artifact_distance = -1
var/turf/cur_turf = get_turf(src)
if(master_controller) //Sanity check due to runtimes ~Z
for(var/turf/simulated/mineral/T in master_controller.artifact_spawning_turfs)
if(T.artifact_find)
if(T.z == cur_turf.z)