mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Fixes admin-spawned vines not having selected mutations (#93948)
## About The Pull Request Closes #93931 ## Changelog 🆑 fix: Fixed admin-spawned vines not having selected mutations /🆑
This commit is contained in:
@@ -52,20 +52,25 @@
|
||||
final_turf_candidates += floor
|
||||
qdel(vine)
|
||||
|
||||
if(length(final_turf_candidates)) //Pick a turf to spawn at if we can
|
||||
var/turf/floor = pick(final_turf_candidates)
|
||||
var/list/selected_mutations = list()
|
||||
if(!length(final_turf_candidates))
|
||||
return
|
||||
|
||||
if(mutations_overridden == FALSE)
|
||||
selected_mutations = list(pick(subtypesof(/datum/spacevine_mutation)))
|
||||
else
|
||||
selected_mutations = override_mutations
|
||||
if(isnull(potency))
|
||||
potency = rand(50,100)
|
||||
if(isnull(production))
|
||||
production = rand(1, 4)
|
||||
// Pick a turf to spawn at if we can
|
||||
var/turf/floor = pick(final_turf_candidates)
|
||||
var/list/selected_mutations = list()
|
||||
|
||||
new /datum/spacevine_controller(floor, selected_mutations, potency, production, src) //spawn a controller at turf with randomized stats and a single random mutation
|
||||
if(mutations_overridden)
|
||||
selected_mutations = override_mutations
|
||||
else
|
||||
selected_mutations = list(pick(valid_subtypesof(/datum/spacevine_mutation)))
|
||||
|
||||
if(isnull(potency))
|
||||
potency = rand(50, 100)
|
||||
|
||||
if(isnull(production))
|
||||
production = rand(1, 4)
|
||||
|
||||
new /datum/spacevine_controller(floor, selected_mutations, potency, production, src) //spawn a controller at turf with randomized stats and a single random mutation
|
||||
|
||||
/datum/event_admin_setup/set_location/spacevine
|
||||
input_text = "Spawn vines at current location?"
|
||||
@@ -83,17 +88,17 @@
|
||||
if("Custom")
|
||||
return ..()
|
||||
if("Random")
|
||||
choices = list("[pick(subtypesof(/datum/spacevine_mutation))]")
|
||||
choices = list("[pick(valid_subtypesof(/datum/spacevine_mutation))]")
|
||||
else
|
||||
return ADMIN_CANCEL_EVENT
|
||||
|
||||
/datum/event_admin_setup/multiple_choice/spacevine/get_options()
|
||||
return subtypesof(/datum/spacevine_mutation/)
|
||||
return valid_subtypesof(/datum/spacevine_mutation)
|
||||
|
||||
/datum/event_admin_setup/multiple_choice/spacevine/apply_to_event(datum/round_event/spacevine/event)
|
||||
var/list/type_choices = list()
|
||||
for(var/choice in choices)
|
||||
type_choices += text2path(choice)
|
||||
for(var/list/choice in choices)
|
||||
type_choices += text2path(choice[1])
|
||||
event.mutations_overridden = TRUE
|
||||
event.override_mutations = type_choices
|
||||
|
||||
|
||||
Reference in New Issue
Block a user