Fix up show antagonist to list heroes and villains

This commit is contained in:
ZomgPonies
2015-05-06 03:07:46 -04:00
parent 2beaae7734
commit a02bb8a1ae
6 changed files with 33 additions and 19 deletions
+4 -4
View File
@@ -36,7 +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/all_superheroes[0]
var/global/list/whitelisted_species = list()
//global var of unsafe-to-spawn-on-reaction mobs
@@ -142,10 +142,10 @@ 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
paths = typesof(/datum/superheroes)-/datum/superheroes
for(var/T in paths)
var/datum/superheros/S = new T
all_superheros[S.name] = S
var/datum/superheroes/S = new T
all_superheroes[S.name] = S
//Languages and species.
paths = typesof(/datum/language)-/datum/language
+2 -2
View File
@@ -11,7 +11,7 @@
var/list/types = list()
/obj/machinery/wish_granter/New()
for(var/supname in all_superheros)
for(var/supname in all_superheroes)
types |= supname
..()
@@ -37,7 +37,7 @@
if(!wish) return
var/mob/living/carbon/human/M = user
var/datum/superheros/S = all_superheros[wish]
var/datum/superheroes/S = all_superheroes[wish]
if(S)
S.assign_genes(M)
S.assign_spells(M)
+6
View File
@@ -513,6 +513,12 @@
if(ticker.mode.xenos.len)
dat += check_role_table("Xenos", ticker.mode.xenos, src)
if(ticker.mode.superheroes.len)
dat += check_role_table("Superheroes", ticker.mode.superheroes, src)
if(ticker.mode.supervillains.len)
dat += check_role_table("Supervillains", ticker.mode.supervillains, src)
var/datum/game_mode/mutiny/mutiny = get_mutiny_mode()
if(mutiny)
dat += mutiny.check_antagonists_ui(src)
+2 -2
View File
@@ -289,8 +289,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
alert("Wait until the game starts")
return
if(ishuman(M))
var/type = input("Pick the Superhero","Superhero") as null|anything in all_superheros
var/datum/superheros/S = all_superheros[type]
var/type = input("Pick the Superhero","Superhero") as null|anything in all_superheroes
var/datum/superheroes/S = all_superheroes[type]
if(S)
S.assign_genes(M)
S.assign_spells(M)
@@ -1,23 +1,27 @@
/datum/superheros
/datum/game_mode
var/list/datum/mind/superheroes = list()
var/list/datum/mind/supervillains = list()
/datum/superheroes
var/name
var/list/default_genes = list()
var/list/default_spells = list()
/datum/superheros/proc/equip(var/mob/living/carbon/human/H)
/datum/superheroes/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)
/datum/superheroes/proc/assign_genes(var/mob/living/carbon/human/H)
if(default_genes.len)
for(var/gene in default_genes)
H.mutations |= gene
H.update_mutations()
return
/datum/superheros/proc/assign_spells(var/mob/living/carbon/human/H)
/datum/superheroes/proc/assign_spells(var/mob/living/carbon/human/H)
if(default_spells.len)
for(var/spell in default_spells)
var/obj/effect/proc_holder/spell/wizard/S = spell
@@ -27,11 +31,11 @@
return
/datum/superheros/owlman
/datum/superheroes/owlman
name = "Owlman"
default_genes = list(REGEN, NO_BREATH)
/datum/superheros/owlman/equip(var/mob/living/carbon/human/H)
/datum/superheroes/owlman/equip(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
@@ -50,12 +54,13 @@
H.regenerate_icons()
ticker.mode.superheroes += H
/datum/superheros/griffin
/datum/superheroes/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)
/datum/superheroes/griffin/equip(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/griffin(H), slot_shoes)
@@ -72,13 +77,14 @@
H.regenerate_icons()
ticker.mode.supervillains += H
/datum/superheros/lightnian
/datum/superheroes/lightnian
name = "LightnIan"
default_genes = list(REGEN, NO_BREATH)
default_spells = list(/obj/effect/proc_holder/spell/wizard/targeted/lightning/lightnian)
/datum/superheros/lightnian/equip(var/mob/living/carbon/human/H)
/datum/superheroes/lightnian/equip(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
@@ -95,3 +101,5 @@
H.equip_to_slot_or_del(W, slot_wear_id)
H.regenerate_icons()
ticker.mode.superheroes += H