From a02bb8a1aec5a2cf097c776196911ab4e5c4d00d Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Wed, 6 May 2015 03:07:46 -0400 Subject: [PATCH] Fix up show antagonist to list heroes and villains --- code/__HELPERS/global_lists.dm | 8 +++--- code/game/machinery/wishgranter.dm | 4 +-- code/modules/admin/player_panel.dm | 6 ++++ code/modules/admin/verbs/debug.dm | 4 +-- .../carbon/{superheros.dm => superheroes.dm} | 28 ++++++++++++------- paradise.dme | 2 +- 6 files changed, 33 insertions(+), 19 deletions(-) rename code/modules/mob/living/carbon/{superheros.dm => superheroes.dm} (80%) diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 03dd3e3f739..8fa1726ba52 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -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 diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index caf7f8a1343..11f972742ec 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -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) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index a3d862afce6..1b75507ac3b 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -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) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 10102dd836c..b4c1ce9f4ee 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -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) diff --git a/code/modules/mob/living/carbon/superheros.dm b/code/modules/mob/living/carbon/superheroes.dm similarity index 80% rename from code/modules/mob/living/carbon/superheros.dm rename to code/modules/mob/living/carbon/superheroes.dm index 7d561b83c7c..7e74525833c 100644 --- a/code/modules/mob/living/carbon/superheros.dm +++ b/code/modules/mob/living/carbon/superheroes.dm @@ -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 \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index 282559a4f76..87370cb5516 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1184,7 +1184,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\superheroes.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"