From c6aa8a8466d9dee077d50b8fea7c5f0cd48cd763 Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Fri, 19 Oct 2018 20:57:28 +0200 Subject: [PATCH] Requested changes + smol fixes --- .../gamemodes/miniantags/guardian/guardian.dm | 98 ++++++++----------- 1 file changed, 42 insertions(+), 56 deletions(-) diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index df683bb0ee7..4b13c5134b1 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -251,6 +251,12 @@ var/ling_failure = "The deck refuses to respond to a souless creature such as you." var/list/possible_guardians = list("Chaos", "Standard", "Ranged", "Support", "Explosive", "Assassin", "Lightning", "Charger", "Protector") var/random = TRUE + var/color_list = list("Pink" = "#FFC0CB", + "Red" = "#FF0000", + "Orange" = "#FFA500", + "Green" = "#008000", + "Blue" = "#0000FF") + var/name_list = list("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces") /obj/item/guardiancreator/attack_self(mob/living/user) for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.living_mob_list) @@ -277,14 +283,14 @@ used = FALSE -/obj/item/guardiancreator/proc/spawn_guardian(var/mob/living/user, var/key) - var/gaurdiantype = "Standard" +/obj/item/guardiancreator/proc/spawn_guardian(mob/living/user, key) + var/guardian_type = "Standard" if(random) - gaurdiantype = pick(possible_guardians) + guardian_type = pick(possible_guardians) else - gaurdiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians + guardian_type = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians var/pickedtype = /mob/living/simple_animal/hostile/guardian/punch - switch(gaurdiantype) + switch(guardian_type) if("Chaos") pickedtype = /mob/living/simple_animal/hostile/guardian/fire @@ -326,26 +332,17 @@ user.verbs += /mob/living/proc/guardian_recall user.verbs += /mob/living/proc/guardian_reset - create_theme(G, user) - -/obj/item/guardiancreator/proc/create_theme(var/mob/living/simple_animal/hostile/guardian/G, mob/living/user) - - var/magic_list = list("Pink" = "#FFC0CB", \ - "Red" = "#FF0000", \ - "Orange" = "#FFA500", \ - "Green" = "#008000", \ - "Blue" = "#0000FF") - - var/color = pick(magic_list) - G.name_color = magic_list[color] - var/picked_name = pick("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces") + var/color = pick(color_list) + G.name_color = color_list[color] + var/picked_name = pick(name_list) + create_theme(G, user, picked_name, color) +/obj/item/guardiancreator/proc/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color) G.name = "[picked_name] [color]" G.real_name = "[picked_name] [color]" G.icon_living = "[theme][color]" G.icon_state = "[theme][color]" G.icon_dead = "[theme][color]" - to_chat(user, "[G.magic_fluff_string].") /obj/item/guardiancreator/choose @@ -362,30 +359,25 @@ used_message = "The injector has already been used." failure_message = "...ERROR. BOOT SEQUENCE ABORTED. AI FAILED TO INTIALIZE. PLEASE CONTACT SUPPORT OR TRY AGAIN LATER." ling_failure = "The holoparasites recoil in horror. They want nothing to do with a creature like you." + color_list = list("Rose" = "#F62C6B", + "Peony" = "#E54750", + "Lily" = "#F6562C", + "Daisy" = "#ECCD39", + "Zinnia" = "#89F62C", + "Ivy" = "#5DF62C", + "Iris" = "#2CF6B8", + "Petunia" = "#51A9D4", + "Violet" = "#8A347C", + "Lilac" = "#C7A0F6", + "Orchid" = "#F62CF5") + name_list = list("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium") -/obj/item/guardiancreator/tech/create_theme(var/mob/living/simple_animal/hostile/guardian/G, mob/living/user) - var/tech_list = list("Rose" = "#F62C6B", \ - "Peony" = "#E54750", \ - "Lily" = "#F6562C", \ - "Daisy" = "#ECCD39", \ - "Zinnia" = "#89F62C", \ - "Ivy" = "#5DF62C", \ - "Iris" = "#2CF6B8", \ - "Petunia" = "#51A9D4", \ - "Violet" = "#8A347C", \ - "Lilac" = "#C7A0F6", \ - "Orchid" = "#F62CF5") - - var/color = pick(tech_list) //technically not colors, just flowers that can be specific colors - G.name_color = tech_list[color] - var/picked_name = pick("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium") - +/obj/item/guardiancreator/tech/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color) G.name = "[picked_name] [color]" G.real_name = "[picked_name] [color]" G.icon_living = "[theme][color]" G.icon_state = "[theme][color]" G.icon_dead = "[theme][color]" - to_chat(user, "[G.tech_fluff_string].") G.speak_emote = list("states") @@ -405,31 +397,25 @@ use_message = "The eggs begin to twitch..." used_message = "The cluster already hatched." failure_message = "...but soon settles again. Guess they weren't ready to hatch after all." + color_list = list("Rose" = "#F62C6B", + "Peony" = "#E54750", + "Lily" = "#F6562C", + "Daisy" = "#ECCD39", + "Zinnia" = "#89F62C", + "Ivy" = "#5DF62C", + "Iris" = "#2CF6B8", + "Petunia" = "#51A9D4", + "Violet" = "#8A347C", + "Lilac" = "#C7A0F6", + "Orchid" = "#F62CF5") + name_list = list("brood", "hive", "nest") -/obj/item/guardiancreator/biological/create_theme(var/mob/living/simple_animal/hostile/guardian/G, mob/living/user) - var/bio_list = list("Rose" = "#F62C6B", \ - "Peony" = "#E54750", \ - "Lily" = "#F6562C", \ - "Daisy" = "#ECCD39", \ - "Zinnia" = "#89F62C", \ - "Ivy" = "#5DF62C", \ - "Iris" = "#2CF6B8", \ - "Petunia" = "#51A9D4", \ - "Violet" = "#8A347C", \ - "Lilac" = "#C7A0F6", \ - "Orchid" = "#F62CF5") - - var/color = pick(bio_list) //technically not colors, just using the same flowers as tech currerntly - G.name_color = bio_list[color] - var/picked_name = pick("brood", "hive", "nest") - to_chat(user, "[G.bio_fluff_string].") - +/obj/item/guardiancreator/biological/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color) G.name = "[color] [picked_name]" G.real_name = "[color] [picked_name]" G.icon_living = "[theme][color]" G.icon_state = "[theme][color]" G.icon_dead = "[theme][color]" - to_chat(user, "[G.bio_fluff_string].") G.attacktext = "swarms" G.speak_emote = list("chitters")