Fixes chem splicing, bioluminescence and seed packets for xenobotany.

This commit is contained in:
Zuhayr
2014-10-15 10:05:50 +10:30
parent be7d30630d
commit ca13d1d5d8
7 changed files with 88 additions and 63 deletions

View File

@@ -121,9 +121,6 @@ datum/controller/game_controller/proc/setup_objects()
//Set up spawn points. //Set up spawn points.
populate_spawn_points() populate_spawn_points()
//Set up roundstart seed list.
populate_seed_list()
world << "\red \b Initializations complete." world << "\red \b Initializations complete."
sleep(-1) sleep(-1)

View File

@@ -9,7 +9,7 @@
if(!holder) return if(!holder) return
if(master_controller && master_controller.asteroid_ore_map) if(master_controller && master_controller.asteroid_ore_map)
master_controller.asteroid_ore_map.print_distribution_map() master_controller.asteroid_ore_map.print_distribution_map(usr)
/client/proc/remake_distribution_map() /client/proc/remake_distribution_map()
set category = "Debug" set category = "Debug"

View File

@@ -149,6 +149,7 @@ var/list/admin_verbs_debug = list(
/client/proc/restart_controller, /client/proc/restart_controller,
/client/proc/remake_distribution_map, /client/proc/remake_distribution_map,
/client/proc/show_distribution_map, /client/proc/show_distribution_map,
/client/proc/show_plant_genes,
/client/proc/enable_debug_verbs, /client/proc/enable_debug_verbs,
/client/proc/callproc, /client/proc/callproc,
/client/proc/toggledebuglogs, /client/proc/toggledebuglogs,

View File

@@ -176,7 +176,7 @@
weedlevel += 1 * HYDRO_SPEED_MULTIPLIER weedlevel += 1 * HYDRO_SPEED_MULTIPLIER
// There's a chance for a weed explosion to happen if the weeds take over. // There's a chance for a weed explosion to happen if the weeds take over.
// Plants that are themselves weeds (weed_tolernace > 10) are unaffected. // Plants that are themselves weeds (weed_tolerance > 10) are unaffected.
if (weedlevel >= 10 && prob(10)) if (weedlevel >= 10 && prob(10))
if(!seed || weedlevel >= seed.weed_tolerance) if(!seed || weedlevel >= seed.weed_tolerance)
weed_invasion() weed_invasion()
@@ -184,6 +184,7 @@
// If there is no seed data (and hence nothing planted), // If there is no seed data (and hence nothing planted),
// or the plant is dead, process nothing further. // or the plant is dead, process nothing further.
if(!seed || dead) if(!seed || dead)
if(draw_warnings) update_icon() //Harvesting would fail to set alert icons properly.
return return
// Advance plant age. // Advance plant age.

View File

@@ -1,6 +1,21 @@
var/global/list/seed_types = list() // A list of all seed data. var/global/list/seed_types = list() // A list of all seed data.
var/global/list/gene_tag_masks = list() // Gene obfuscation for delicious trial and error goodness. var/global/list/gene_tag_masks = list() // Gene obfuscation for delicious trial and error goodness.
// Debug for testing seed genes.
/client/proc/show_plant_genes()
set category = "Debug"
set name = "Show Plant Genes"
set desc = "Prints the round's plant gene masks."
if(!holder) return
if(!gene_tag_masks)
usr << "Gene masks not set."
return
for(var/mask in gene_tag_masks)
usr << "[mask]: [gene_tag_masks[mask]]"
// Predefined/roundstart varieties use a string key to make it // Predefined/roundstart varieties use a string key to make it
// easier to grab the new variety when mutating. Post-roundstart // easier to grab the new variety when mutating. Post-roundstart
// and mutant varieties use their uid converted to a string instead. // and mutant varieties use their uid converted to a string instead.
@@ -130,49 +145,50 @@ proc/populate_seed_list()
var/additional_chems = rand(0,5) var/additional_chems = rand(0,5)
var/list/possible_chems = list( if(additional_chems)
"bicaridine", var/list/possible_chems = list(
"hyperzine", "bicaridine",
"cryoxadone", "hyperzine",
"blood", "cryoxadone",
"water", "blood",
"potassium", "water",
"plasticide", "potassium",
"slimetoxin", "plasticide",
"aslimetoxin", "slimetoxin",
"inaprovaline", "aslimetoxin",
"space_drugs", "inaprovaline",
"paroxetine", "space_drugs",
"mercury", "paroxetine",
"sugar", "mercury",
"radium", "sugar",
"ryetalyn", "radium",
"alkysine", "ryetalyn",
"thermite", "alkysine",
"tramadol", "thermite",
"cryptobiolin", "tramadol",
"dermaline", "cryptobiolin",
"dexalin", "dermaline",
"phoron", "dexalin",
"synaptizine", "phoron",
"impedrezene", "synaptizine",
"hyronalin", "impedrezene",
"peridaxon", "hyronalin",
"toxin", "peridaxon",
"rezadone", "toxin",
"ethylredoxrazine", "rezadone",
"slimejelly", "ethylredoxrazine",
"cyanide", "slimejelly",
"mindbreaker", "cyanide",
"stoxin" "mindbreaker",
) "stoxin"
)
for(var/x=1;x<=additional_chems;x++) for(var/x=1;x<=additional_chems;x++)
if(!possible_chems.len) if(!possible_chems.len)
break break
var/new_chem = pick(possible_chems) var/new_chem = pick(possible_chems)
possible_chems -= new_chem possible_chems -= new_chem
chems[new_chem] = list(rand(1,10),rand(10,20)) chems[new_chem] = list(rand(1,10),rand(10,20))
if(prob(90)) if(prob(90))
requires_nutrients = 1 requires_nutrients = 1
@@ -291,7 +307,7 @@ proc/populate_seed_list()
source_turf.visible_message("\blue \The [display_name] begins to glow!") source_turf.visible_message("\blue \The [display_name] begins to glow!")
if(prob(degree*2)) if(prob(degree*2))
biolum_colour = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]" biolum_colour = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
source_turf.visible_message("\blue \The [display_name]'s glow <font=[biolum_colour]>changes colour</font>!") source_turf.visible_message("\blue \The [display_name]'s glow <font color='[biolum_colour]'>changes colour</font>!")
else else
source_turf.visible_message("\blue \The [display_name]'s glow dims...") source_turf.visible_message("\blue \The [display_name]'s glow dims...")
if(11) if(11)
@@ -332,24 +348,21 @@ proc/populate_seed_list()
var/list/gene_chem = gene_value[rid] var/list/gene_chem = gene_value[rid]
if(chems[rid]) if(!chems[rid])
chems[rid] = gene_chem.Copy()
continue
var/list/chem_value = chems[rid] for(var/i=1;i<=gene_chem.len;i++)
chems[rid][1] = max(1,round((gene_chem[1] + chem_value[1])/2)) if(isnull(gene_chem[i])) gene_chem[i] = 0
if(gene_chem.len > 1) if(chems[rid][i])
if(chem_value > 1) chems[rid][i] = max(1,round((gene_chem[i] + chems[rid][i])/2))
chems[rid][2] = max(1,round((gene_chem[2] + chem_value[2])/2)) else
else chems[rid][i] = gene_chem[i]
chems[rid][2] = gene_chem[2]
else
var/list/new_chem = gene_chem[rid]
chems[rid] = new_chem.Copy()
var/list/new_gasses = gene.values[3] var/list/new_gasses = gene.values[3]
if(istype(new_gasses)) if(islist(new_gasses))
if(!exude_gasses) exude_gasses = list() if(!exude_gasses) exude_gasses = list()
exude_gasses |= new_gasses exude_gasses |= new_gasses
for(var/gas in exude_gasses) for(var/gas in exude_gasses)
@@ -485,6 +498,7 @@ proc/populate_seed_list()
//Place the plant products at the feet of the user. //Place the plant products at the feet of the user.
/datum/seed/proc/harvest(var/mob/user,var/yield_mod,var/harvest_sample) /datum/seed/proc/harvest(var/mob/user,var/yield_mod,var/harvest_sample)
if(!user) if(!user)
return return
@@ -522,6 +536,10 @@ proc/populate_seed_list()
for(var/i = 0;i<total_yield;i++) for(var/i = 0;i<total_yield;i++)
var/product_type = pick(products) var/product_type = pick(products)
var/obj/item/product = new product_type(get_turf(user)) var/obj/item/product = new product_type(get_turf(user))
if(biolum)
if(biolum_colour)
product.l_color = biolum_colour
product.SetLuminosity(biolum)
//Handle spawning in living, mobile products (like dionaea). //Handle spawning in living, mobile products (like dionaea).
if(istype(product,/mob/living)) if(istype(product,/mob/living))

View File

@@ -103,12 +103,15 @@ Deep minerals:
for(var/y = 1, y <= real_size, y++) for(var/y = 1, y <= real_size, y++)
map[MAP_CELL] = 0 map[MAP_CELL] = 0
/datum/ore_distribution/proc/print_distribution_map() /datum/ore_distribution/proc/print_distribution_map(var/mob/usr)
var/line = "" var/line = ""
for(var/x = 1, x <= real_size, x++) for(var/x = 1, x <= real_size, x++)
for(var/y = 1, y <= real_size, y++) for(var/y = 1, y <= real_size, y++)
line += num2text(round(map[MAP_CELL]/25.5)) line += num2text(round(map[MAP_CELL]/25.5))
world << line if(usr)
usr << line
else
world << line
line = "" line = ""
/datum/ore_distribution/proc/generate_distribution_map(var/x,var/y,var/input_size) /datum/ore_distribution/proc/generate_distribution_map(var/x,var/y,var/input_size)

View File

@@ -41,6 +41,11 @@
sleep_offline = 1 sleep_offline = 1
// Set up roundstart seed list. This is here because vendors were
// bugging out and not populating with the correct packet names
// due to this list not being instantiated.
populate_seed_list()
master_controller = new /datum/controller/game_controller() master_controller = new /datum/controller/game_controller()
spawn(1) spawn(1)
master_controller.setup() master_controller.setup()