From 90acd39626fe6eb191b179fd6245a2d5ee5311d4 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Thu, 26 Nov 2015 15:08:54 -0600 Subject: [PATCH 1/5] Guardian recall --- .../mob/living/simple_animal/guardian/guardian.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index b9a2a102043..5f958469b1d 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -156,6 +156,16 @@ log_say("[src.real_name]/[src.key] : [text]") +/mob/living/proc/guardian_recall() + set name = "Recall Guardian" + set category = "Guardian" + set desc = "Forcibly recall your guardian." + for(var/mob/M in mob_list) + if(istype (M, /mob/living/simple_animal/hostile/guardian)) + var/mob/living/simple_animal/hostile/guardian/G = M + if(G.summoner == src) + G.Recall() + /mob/living/simple_animal/hostile/guardian/proc/ToggleLight() if(!luminosity) SetLuminosity(3) From 7b6bbbb58e88879584e43ae06b809a1bc5a1c0e2 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Thu, 26 Nov 2015 15:17:23 -0600 Subject: [PATCH 2/5] Good catch --- code/modules/mob/living/simple_animal/guardian/guardian.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 5f958469b1d..35e3b932419 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -608,6 +608,7 @@ G << "While personally invincible, you will die if [user.real_name] does, and any damage dealt to you will have a portion passed on to them as you feed upon them to sustain yourself." G << "[G.playstyle_string]" user.verbs += /mob/living/proc/guardian_comm + user.verbs += /mob/living/proc/guardian_recall() switch (theme) if("magic") G.name = "[mob_name] [capitalize(picked_color)]" From 4e0fd916885d2a8745643d4e02e3679d7a57ff8b Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Thu, 26 Nov 2015 15:19:11 -0600 Subject: [PATCH 3/5] Why am I so bad at coding? --- code/modules/mob/living/simple_animal/guardian/guardian.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 35e3b932419..b8da3474ead 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -608,7 +608,7 @@ G << "While personally invincible, you will die if [user.real_name] does, and any damage dealt to you will have a portion passed on to them as you feed upon them to sustain yourself." G << "[G.playstyle_string]" user.verbs += /mob/living/proc/guardian_comm - user.verbs += /mob/living/proc/guardian_recall() + user.verbs += /mob/living/proc/guardian_recall switch (theme) if("magic") G.name = "[mob_name] [capitalize(picked_color)]" From d8e27fb1683b4c00589d96211ab112924959f00b Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Thu, 26 Nov 2015 17:18:02 -0600 Subject: [PATCH 4/5] Reroll guardian --- .../living/simple_animal/guardian/guardian.dm | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index b8da3474ead..dac601c6b93 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -166,6 +166,27 @@ if(G.summoner == src) G.Recall() +/mob/living/proc/guardian_reset() + set name = "Reset Guardian Player (One Use)" + set category = "Guardian" + set desc = "Re-rolls which ghost will control your Guardian. One use." + for(var/mob/M in mob_list) + if(istype (M, /mob/living/simple_animal/hostile/guardian)) + var/mob/living/simple_animal/hostile/guardian/G = M + if(G.summoner == src) + var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [G.real_name]?", "pAI", null, FALSE, 100) + var/mob/dead/observer/new_stand = null + if(candidates.len) + new_stand = pick(candidates) + G << "Your user reset you, and your body was taken over by a ghost. Looks like they weren't happy with your performance." + src << "Your guardian has been successfully reset." + message_admins("[key_name_admin(new_stand)] has taken control of ([key_name_admin(G)])") + G.ghostize() + G.key = new_stand.key + src.verbs -= /mob/living/proc/guardian_reset + else + src << "There were no ghosts willing to take control. Looks like you're stuck with your Guardian for now." + /mob/living/simple_animal/hostile/guardian/proc/ToggleLight() if(!luminosity) SetLuminosity(3) @@ -609,6 +630,7 @@ G << "[G.playstyle_string]" user.verbs += /mob/living/proc/guardian_comm user.verbs += /mob/living/proc/guardian_recall + user.verbs += /mob/living/proc/guardian_reset switch (theme) if("magic") G.name = "[mob_name] [capitalize(picked_color)]" From 3533be60c8e2811444cd1705da13b895bdb22c83 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Thu, 26 Nov 2015 18:15:46 -0600 Subject: [PATCH 5/5] Fixes lists --- .../living/simple_animal/guardian/guardian.dm | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index dac601c6b93..14a03d2dbb9 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -160,32 +160,28 @@ set name = "Recall Guardian" set category = "Guardian" set desc = "Forcibly recall your guardian." - for(var/mob/M in mob_list) - if(istype (M, /mob/living/simple_animal/hostile/guardian)) - var/mob/living/simple_animal/hostile/guardian/G = M - if(G.summoner == src) - G.Recall() + for(var/mob/living/simple_animal/hostile/guardian/G in mob_list) + if(G.summoner == src) + G.Recall() /mob/living/proc/guardian_reset() set name = "Reset Guardian Player (One Use)" set category = "Guardian" set desc = "Re-rolls which ghost will control your Guardian. One use." - for(var/mob/M in mob_list) - if(istype (M, /mob/living/simple_animal/hostile/guardian)) - var/mob/living/simple_animal/hostile/guardian/G = M - if(G.summoner == src) - var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [G.real_name]?", "pAI", null, FALSE, 100) - var/mob/dead/observer/new_stand = null - if(candidates.len) - new_stand = pick(candidates) - G << "Your user reset you, and your body was taken over by a ghost. Looks like they weren't happy with your performance." - src << "Your guardian has been successfully reset." - message_admins("[key_name_admin(new_stand)] has taken control of ([key_name_admin(G)])") - G.ghostize() - G.key = new_stand.key - src.verbs -= /mob/living/proc/guardian_reset - else - src << "There were no ghosts willing to take control. Looks like you're stuck with your Guardian for now." + for(var/mob/living/simple_animal/hostile/guardian/G in mob_list) + if(G.summoner == src) + var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [G.real_name]?", "pAI", null, FALSE, 100) + var/mob/dead/observer/new_stand = null + if(candidates.len) + new_stand = pick(candidates) + G << "Your user reset you, and your body was taken over by a ghost. Looks like they weren't happy with your performance." + src << "Your guardian has been successfully reset." + message_admins("[key_name_admin(new_stand)] has taken control of ([key_name_admin(G)])") + G.ghostize() + G.key = new_stand.key + src.verbs -= /mob/living/proc/guardian_reset + else + src << "There were no ghosts willing to take control. Looks like you're stuck with your Guardian for now." /mob/living/simple_animal/hostile/guardian/proc/ToggleLight() if(!luminosity)