Fixes division by zero (#26181)

This commit is contained in:
adrian
2020-04-13 16:31:18 -03:00
committed by GitHub
parent 4a11790d40
commit 170c4839ed

View File

@@ -248,24 +248,26 @@
if(chefcount > 2)
episode_names += new /datum/episode_name/rare("Too Many Cooks", "There were [chefcount] chefs on the shuttle.", min(1500, chefcount*450)) //intentionally not capitalized, as the theme will customize it
theme = "cooks"
if(assistantcount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("[pick("GREY GOO", "RISE OF THE GREYTIDE")]", "Most of the survivors were Assistants, or at least dressed like one.", min(1500, assistantcount*200))
if(skeletoncount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("SKELETON CREW", "Most of the survivors were literal skeletons.", min(1500, skeletoncount*350))
if(voxcount / human_escapees.len > 0.6 && human_escapees.len > 2)
episode_names += new /datum/episode_name/rare("BIRDS OF A FEATHER...", "Most of the survivors were Vox.", min(1500, voxcount*250))
if(voxcount / human_escapees.len > 0.6 && emergency_shuttle.was_early_launched)
episode_names += new /datum/episode_name/rare("EARLY BIRD GETS THE WORM", "Most or all of the survivors were Vox, and the shuttle timer was shortened.", 1500)
if(dionacount / human_escapees.len > 0.6)
episode_names += new /datum/episode_name/rare("[pick("ALL BARK AND NO BITE", "THE CREW GETS STUMPED")]", "Most of the survivors were Diona.", min(1500, dionacount*350))
if(baldycount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("TO BALDLY GO", "Most of the survivors were bald, and it shows.", min(1500, baldycount*250))
if(fattycount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("[pick("THE GREAT FATSBY", "THE CREW NEEDS TO LIGHTEN UP", "THE CREW PUTS ON WEIGHT", "THE FOUR CHIN CREW")]", "Most of the survivors were fat.", min(1500, fattycount*250))
if(horsecount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("STRAIGHT FROM THE HORSE'S MOUTH", "Most of the survivors wore horse heads.", min(1500, horsecount*250))
if(tradercount == human_escapees.len)
episode_names += new /datum/episode_name/rare("STEALING HOME", "The Vox Traders hijacked the shuttle.", min(1500, tradercount*500))
if(human_escapees.len)
if(assistantcount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("[pick("GREY GOO", "RISE OF THE GREYTIDE")]", "Most of the survivors were Assistants, or at least dressed like one.", min(1500, assistantcount*200))
if(skeletoncount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("SKELETON CREW", "Most of the survivors were literal skeletons.", min(1500, skeletoncount*350))
if(voxcount / human_escapees.len > 0.6 && human_escapees.len > 2)
episode_names += new /datum/episode_name/rare("BIRDS OF A FEATHER...", "Most of the survivors were Vox.", min(1500, voxcount*250))
if(voxcount / human_escapees.len > 0.6 && emergency_shuttle.was_early_launched)
episode_names += new /datum/episode_name/rare("EARLY BIRD GETS THE WORM", "Most or all of the survivors were Vox, and the shuttle timer was shortened.", 1500)
if(dionacount / human_escapees.len > 0.6)
episode_names += new /datum/episode_name/rare("[pick("ALL BARK AND NO BITE", "THE CREW GETS STUMPED")]", "Most of the survivors were Diona.", min(1500, dionacount*350))
if(baldycount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("TO BALDLY GO", "Most of the survivors were bald, and it shows.", min(1500, baldycount*250))
if(fattycount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("[pick("THE GREAT FATSBY", "THE CREW NEEDS TO LIGHTEN UP", "THE CREW PUTS ON WEIGHT", "THE FOUR CHIN CREW")]", "Most of the survivors were fat.", min(1500, fattycount*250))
if(horsecount / human_escapees.len > 0.6 && human_escapees.len > 3)
episode_names += new /datum/episode_name/rare("STRAIGHT FROM THE HORSE'S MOUTH", "Most of the survivors wore horse heads.", min(1500, horsecount*250))
if(tradercount == human_escapees.len)
episode_names += new /datum/episode_name/rare("STEALING HOME", "The Vox Traders hijacked the shuttle.", min(1500, tradercount*500))
if(human_escapees.len == 1)
var/mob/living/carbon/human/H = human_escapees[1]