module things, jfc
This commit is contained in:
@@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(bounties_list)
|
||||
|
||||
// Returns a new bounty of random type, but does not add it to GLOB.bounties_list.
|
||||
/proc/random_bounty()
|
||||
switch(rand(1, 9))
|
||||
switch(rand(1, 13))
|
||||
if(1)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/assistant))
|
||||
return new subtype
|
||||
@@ -103,40 +103,70 @@ GLOBAL_LIST_EMPTY(bounties_list)
|
||||
if(9)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/slime))
|
||||
return new subtype
|
||||
if(10)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/engineering))
|
||||
return new subtype
|
||||
if(11)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/mining))
|
||||
return new subtype
|
||||
if(12)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/medical))
|
||||
return new subtype
|
||||
if(13)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/botany))
|
||||
return new subtype
|
||||
|
||||
// Called lazily at startup to populate GLOB.bounties_list with random bounties.
|
||||
/proc/setup_bounties()
|
||||
for(var/i = 0; i < 3; ++i)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/assistant))
|
||||
try_add_bounty(new subtype)
|
||||
|
||||
for(var/i = 0; i < 1; ++i)
|
||||
var/list/subtype = pick(subtypesof(/datum/bounty/item/mech))
|
||||
try_add_bounty(new subtype)
|
||||
|
||||
for(var/i = 0; i < 2; ++i)
|
||||
var/list/subtype = pick(subtypesof(/datum/bounty/item/chef))
|
||||
try_add_bounty(new subtype)
|
||||
|
||||
for(var/i = 0; i < 1; ++i)
|
||||
var/list/subtype = pick(subtypesof(/datum/bounty/item/security))
|
||||
try_add_bounty(new subtype)
|
||||
|
||||
try_add_bounty(new /datum/bounty/reagent/simple_drink)
|
||||
try_add_bounty(new /datum/bounty/reagent/complex_drink)
|
||||
try_add_bounty(new /datum/bounty/reagent/chemical)
|
||||
|
||||
for(var/i = 0; i < 1; ++i)
|
||||
var/list/subtype = pick(subtypesof(/datum/bounty/virus))
|
||||
try_add_bounty(new subtype)
|
||||
|
||||
var/pick // instead of creating it a bunch let's go ahead and toss it here, we know we're going to use it for dynamics and subtypes!
|
||||
|
||||
/********************************Subtype Gens********************************/
|
||||
var/list/easy_add_list_subtypes = list(/datum/bounty/item/assistant = 2,
|
||||
/datum/bounty/item/mech = 1,
|
||||
/datum/bounty/item/chef = 2,
|
||||
/datum/bounty/item/security = 1,
|
||||
/datum/bounty/virus = 1,
|
||||
/datum/bounty/item/engineering = 1,
|
||||
/datum/bounty/item/mining = 2,
|
||||
/datum/bounty/item/medical = 2,
|
||||
/datum/bounty/item/botany = 2)
|
||||
|
||||
for(var/the_type in easy_add_list_subtypes)
|
||||
for(var/i in 1 to easy_add_list_subtypes[the_type])
|
||||
pick = pick(subtypesof(the_type))
|
||||
try_add_bounty(new pick)
|
||||
|
||||
/********************************Strict Type Gens********************************/
|
||||
var/list/easy_add_list_strict_types = list(/datum/bounty/reagent/simple_drink = 1,
|
||||
/datum/bounty/reagent/complex_drink = 1,
|
||||
/datum/bounty/reagent/chemical = 1)
|
||||
|
||||
for(var/the_strict_type in easy_add_list_strict_types)
|
||||
for(var/i in 1 to easy_add_list_strict_types[the_strict_type])
|
||||
try_add_bounty(new the_strict_type)
|
||||
|
||||
/********************************Dynamic Gens********************************/
|
||||
|
||||
for(var/i in 0 to 1)
|
||||
if(prob(50))
|
||||
pick = pick(subtypesof(/datum/bounty/item/slime))
|
||||
else
|
||||
pick = pick(subtypesof(/datum/bounty/item/science))
|
||||
try_add_bounty(new pick)
|
||||
|
||||
/********************************Cutoff for Non-Low Priority Bounties********************************/
|
||||
var/datum/bounty/B = pick(GLOB.bounties_list)
|
||||
B.mark_high_priority()
|
||||
|
||||
// Generate these last so they can't be high priority.
|
||||
try_add_bounty(new /datum/bounty/item/alien_organs)
|
||||
try_add_bounty(new /datum/bounty/item/syndicate_documents)
|
||||
try_add_bounty(new /datum/bounty/more_bounties)
|
||||
/********************************Low Priority Gens********************************/
|
||||
var/list/low_priority_strict_type_list = list( /datum/bounty/item/alien_organs,
|
||||
/datum/bounty/item/syndicate_documents,
|
||||
/datum/bounty/item/adamantine,
|
||||
/datum/bounty/more_bounties)
|
||||
|
||||
for(var/low_priority_bounty in low_priority_strict_type_list)
|
||||
try_add_bounty(new low_priority_bounty)
|
||||
|
||||
/proc/completed_bounty_count()
|
||||
var/count = 0
|
||||
|
||||
Reference in New Issue
Block a user