From 9d45361f9bde073aeb8937af6383fac3b1e33e19 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Tue, 27 May 2014 00:20:39 -0400 Subject: [PATCH] 3rd nations commit, moved nations to datums to make things easier down the line. --- baystation12.dme | 1 + code/datums/mind.dm | 2 +- code/game/gamemodes/nations/nationdatums.dm | 30 ++++++++++++++ code/game/gamemodes/nations/nations.dm | 43 +++++++++++++++++---- 4 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 code/game/gamemodes/nations/nationdatums.dm diff --git a/baystation12.dme b/baystation12.dme index 83e37a33dbd..fb0c401635a 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -289,6 +289,7 @@ #include "code\game\gamemodes\mutiny\directives\research_to_ripleys_directive.dm" #include "code\game\gamemodes\mutiny\directives\tau_ceti_needs_women_directive.dm" #include "code\game\gamemodes\mutiny\directives\terminations_directive.dm" +#include "code\game\gamemodes\nations\nationdatums.dm" #include "code\game\gamemodes\nations\nations.dm" #include "code\game\gamemodes\ninja\ninja.dm" #include "code\game\gamemodes\nuclear\nuclear.dm" diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 5454fb31a2f..f34d6eecab1 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -52,7 +52,7 @@ datum/mind var/datum/faction/faction //associated faction var/datum/changeling/changeling //changeling holder - + var/datum/nations/nation //associated nation for CTF var/datum/vampire/vampire //vampire holder var/rev_cooldown = 0 diff --git a/code/game/gamemodes/nations/nationdatums.dm b/code/game/gamemodes/nations/nationdatums.dm new file mode 100644 index 00000000000..0f9b8d366a1 --- /dev/null +++ b/code/game/gamemodes/nations/nationdatums.dm @@ -0,0 +1,30 @@ +/datum/nations + var/name + var/flagpath + var/obj/effect/landmark/nations/landmark + + + +/datum/nations/atmosia + name = "Atmosia" + flagpath = /obj/item/flag/nation/atmos + +/datum/nations/brigston + name = "Brigston" + flagpath = /obj/item/flag/nation/sec + +/datum/nations/cargonia + name = "Cargonia" + flagpath = /obj/item/flag/nation/cargo + +/datum/nations/command + name = "Command" + flagpath = /obj/item/flag/nation/command + +/datum/nations/medistan + name = "Medistan" + flagpath = /obj/item/flag/nation/med + +/datum/nations/scientopia + name = "Scientopia" + flagpath = /obj/item/flag/nation/rnd \ No newline at end of file diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm index 4ff81e9e725..cd51fad8e7c 100644 --- a/code/game/gamemodes/nations/nations.dm +++ b/code/game/gamemodes/nations/nations.dm @@ -60,44 +60,71 @@ datum/game_mode/nations for(var/mob/living/carbon/human/H in player_list) if(H.mind) if(H.mind.assigned_role in engineering_positions) - atmosia += H + H.mind.nation = "Atmosia" H.verbs += /mob/proc/respawn_self H.verbs -= /mob/living/verb/ghost continue else if(H.mind.assigned_role in medical_positions) - medistan += H + H.mind.nation = "Medistan" H.verbs += /mob/proc/respawn_self H.verbs -= /mob/living/verb/ghost continue else if(H.mind.assigned_role in science_positions) - scientopia += H + H.mind.nation = "Scientopia" H.verbs += /mob/proc/respawn_self H.verbs -= /mob/living/verb/ghost continue else if(H.mind.assigned_role in security_positions) - brigston += H + H.mind.nation = "Brigston" H.verbs += /mob/proc/respawn_self H.verbs -= /mob/living/verb/ghost continue else if(H.mind.assigned_role in cargonians) - cargonia += H + H.mind.nation = "Cargonia" H.verbs += /mob/proc/respawn_self H.verbs -= /mob/living/verb/ghost continue else if(H.mind.assigned_role in civilian_positions) - command += H + H.mind.nation = "Command" H.verbs += /mob/proc/respawn_self H.verbs -= /mob/living/verb/ghost continue else if(H.mind.assigned_role == "Captain") - command += H + H.mind.nation = "Command" H.verbs += /mob/proc/respawn_self H.verbs -= /mob/living/verb/ghost continue else - message_admins("[H.name] with [H.mind.assigned_role] could not find any team!") + message_admins("[H.name] with [H.mind.assigned_role] could not find any nation to assign!") continue +/datum/game_mode/nations/proc/populate_datums() + for(var/obj/effect/landmark/nations/N in landmarks_list) + switch(N.name) + if("Atmosia") + var/datum/nations/atmosia/A + A.landmark = N + continue + if("Brigston") + var/datum/nations/brigston/B + B.landmark = N + continue + if("Cargonia") + var/datum/nations/cargonia/C + C.landmark = N + continue + if("Command") + var/datum/nations/command/D + D.landmark = N + continue + if("Medistan") + var/datum/nations/medistan/M + M.landmark = N + continue + if("Scientopia") + var/datum/nations/scientopia/S + S.landmark = N + continue /mob/proc/respawn_self() set category = "OOC"