diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 34082be122e..03dd3e3f739 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -36,6 +36,7 @@ var/global/list/all_species[0] var/global/list/all_languages[0] var/global/list/language_keys[0] // Table of say codes for all languages var/global/list/all_nations[0] +var/global/list/all_superheros[0] var/global/list/whitelisted_species = list() //global var of unsafe-to-spawn-on-reaction mobs @@ -141,6 +142,11 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al var/datum/nations/N = new T all_nations[N.name] = N + paths = typesof(/datum/superheros)-/datum/superheros + for(var/T in paths) + var/datum/superheros/S = new T + all_superheros[S.name] = S + //Languages and species. paths = typesof(/datum/language)-/datum/language for(var/T in paths) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index c00a79e1e6b..7b23ec040cf 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -295,7 +295,7 @@ var/turf/T = get_turf(src) var/turf/U = get_turf(A) - var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam(loc) + var/obj/item/projectile/beam/disabler/LE = new /obj/item/projectile/beam/disabler(loc) LE.icon = 'icons/effects/genetics.dmi' LE.icon_state = "eyelasers" playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1) diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 1f14f105557..caf7f8a1343 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -8,7 +8,13 @@ anchored = 1 density = 1 var/datum/mind/target - var/list/types = list("Owlman", "The Griffin") + var/list/types = list() + +/obj/machinery/wish_granter/New() + for(var/supname in all_superheros) + types |= supname + ..() + /obj/machinery/wish_granter/attack_hand(var/mob/user as mob) usr.set_machine(src) @@ -22,109 +28,20 @@ else user << "The power of the Wish Granter have turned you into the superhero the station deserves. You are a masked vigilante, and answer to no man. Will you use your newfound strength to protect the innocent, or will you hunt the guilty?" + var/wish if(types.len == 1) wish = pick(types) else wish = input("You want to become...","Wish") as null|anything in types + if(!wish) return var/mob/living/carbon/human/M = user - switch(wish) - if("Owlman") - types -= "Owlman" - M.fully_replace_character_name(M.real_name, "Owlman") - - for(var/obj/item/W in M) - M.unEquip(W) - - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/under/owl(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings(M), slot_wear_suit) - M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/owl_mask(M), slot_wear_mask) - - var/obj/item/weapon/card/id/syndicate/W = new(M) - W.name = "[M.real_name]'s ID Card (Superhero)" - W.access = get_all_accesses() - W.assignment = "Superhero" - W.registered_name = M.real_name - M.equip_to_slot_or_del(W, slot_wear_id) - - M.regenerate_icons() - - var/datum/objective/protect/protect = new - protect.owner = user.mind - if(target) - protect.target = target - else - protect.find_target() - target = protect.target - user.mind.objectives += protect - - if("The Griffin") - types -= "The Griffin" - M.fully_replace_character_name(M.real_name, "The Griffin") - - for(var/obj/item/W in M) - M.unEquip(W) - - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/griffin(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/under/griffin(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings/griffinwings(M), slot_wear_suit) - M.equip_to_slot_or_del(new /obj/item/clothing/head/griffin(M), slot_head) - - var/obj/item/weapon/card/id/syndicate/W = new(M) - W.name = "[M.real_name]'s ID Card (Supervillain)" - W.access = get_all_accesses() - W.assignment = "Supervillain" - W.registered_name = M.real_name - M.equip_to_slot_or_del(W, slot_wear_id) - - M.regenerate_icons() - - var/datum/objective/assassinate/assasinate = new - assasinate.owner = user.mind - if(target) - assasinate.target = target - else - assasinate.find_target() - target = assasinate.target - user.mind.objectives += assasinate - - ticker.mode.traitors += user.mind - user.mind.special_role = wish - - var/obj_count = 1 - for(var/datum/objective/OBJ in user.mind.objectives) - user << "Objective #[obj_count]: [OBJ.explanation_text]" - obj_count++ - - - //Time to hand out the powers, since they are currently generic - if (!(HULK in user.mutations)) - user.dna.SetSEState(HULKBLOCK,1) - - if (!(LASER in user.mutations)) - user.mutations.Add(LASER) - - if (!(XRAY in user.mutations)) - user.mutations.Add(XRAY) - user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) - user.see_in_dark = 8 - user.see_invisible = SEE_INVISIBLE_LEVEL_TWO - - if (!(RESIST_COLD in user.mutations)) - user.mutations.Add(RESIST_COLD) - - if (!(RESIST_HEAT in user.mutations)) - user.mutations.Add(RESIST_HEAT) - - if (!(TK in user.mutations)) - user.mutations.Add(TK) - - if(!(REGEN in user.mutations)) - user.mutations.Add(REGEN) - - user.update_mutations() + var/datum/superheros/S = all_superheros[wish] + if(S) + S.assign_genes(M) + S.assign_spells(M) + S.equip(M) //Remove the wishgranter or teleport it randomly on the station if(!types.len) diff --git a/code/modules/mob/living/carbon/superheros.dm b/code/modules/mob/living/carbon/superheros.dm new file mode 100644 index 00000000000..7d6891bcfb8 --- /dev/null +++ b/code/modules/mob/living/carbon/superheros.dm @@ -0,0 +1,70 @@ +/datum/superheros + var/name + var/list/default_genes = list() + var/list/default_spells = list() + + +/datum/superheros/proc/equip(var/mob/living/carbon/human/H) + H.fully_replace_character_name(H.real_name, name) + for(var/obj/item/W in H) + if(istype(W,/obj/item/organ)) continue + H.unEquip(W) + +/datum/superheros/proc/assign_genes(var/mob/living/carbon/human/H) + if(default_genes.len) + for(var/gene in default_genes.len) + H.mutations |= gene + H.update_mutations() + return + +/datum/superheros/proc/assign_spells(var/mob/living/carbon/human/H) + return + + +/datum/superheros/owlman + name = "Owlman" + default_genes = list(LASER, RESIST_COLD, RESIST_HEAT, REGEN, NO_BREATH) + +/datum/superheros/owlman/equip(var/mob/living/carbon/human/H) + ..() + + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes) + H.equip_to_slot_or_del(new /obj/item/clothing/under/owl(H), slot_w_uniform) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings(H), slot_wear_suit) + H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/owl_mask(H), slot_wear_mask) + + var/obj/item/weapon/card/id/syndicate/W = new(H) + W.name = "[H.real_name]'s ID Card (Superhero)" + W.access = get_all_accesses() + W.assignment = "Superhero" + W.registered_name = H.real_name + H.equip_to_slot_or_del(W, slot_wear_id) + + H.regenerate_icons() + + +/datum/superheros/griffin + name = "The Griffin" + default_genes = list(LASER, RESIST_COLD, RESIST_HEAT, REGEN, NO_BREATH) + +/datum/superheros/griffin/equip(var/mob/living/carbon/human/H) + ..() + + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/griffin(H), slot_shoes) + H.equip_to_slot_or_del(new /obj/item/clothing/under/griffin(H), slot_w_uniform) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings/griffinwings(H), slot_wear_suit) + H.equip_to_slot_or_del(new /obj/item/clothing/head/griffin(H), slot_head) + + var/obj/item/weapon/card/id/syndicate/W = new(H) + W.name = "[H.real_name]'s ID Card (Supervillain)" + W.access = get_all_accesses() + W.assignment = "Supervillain" + W.registered_name = H.real_name + H.equip_to_slot_or_del(W, slot_wear_id) + + H.regenerate_icons() + +/* Dont fill out until ready (sprites + powers) +/datum/superheros/lightnian + name = "LightnIan" +*/ diff --git a/paradise.dme b/paradise.dme index b15100499bf..534c3eb3d2f 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1183,6 +1183,7 @@ #include "code\modules\mob\living\carbon\life.dm" #include "code\modules\mob\living\carbon\shock.dm" #include "code\modules\mob\living\carbon\species.dm" +#include "code\modules\mob\living\carbon\superheros.dm" #include "code\modules\mob\living\carbon\alien\alien.dm" #include "code\modules\mob\living\carbon\alien\alien_defenses.dm" #include "code\modules\mob\living\carbon\alien\death.dm"