From a71377108a900f537dc77ab48003d2c74ef5e8bd Mon Sep 17 00:00:00 2001
From: variableundefined <40092670+variableundefined@users.noreply.github.com>
Date: Sat, 13 Oct 2018 21:11:18 +0800
Subject: [PATCH 1/5] Improve revenant code a bit
---
.../gamemodes/miniantags/revenant/revenant.dm | 34 +++++++++++--------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index d75a1bd6d52..ce1f5fc980b 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -121,9 +121,20 @@
remove_from_all_data_huds()
spawn(5)
- if(src.mind)
- src.mind.wipe_memory()
- src << 'sound/effects/ghost.ogg'
+ if(mind)
+ giveObjectivesandGoals()
+ if(!giveSpells())
+ message_admins("Revenant was created but has no mind. Trying again in ten seconds.")
+ addtimer(CALLBACK(src, .proc/tryGiveinTen), 100)
+
+/mob/living/simple_animal/revenant/proc/tryGiveinTen()
+ if(!giveSpells())
+ message_admins("Revenant still has no mind. Deleting...")
+ qdel(src)
+ else
+ giveObjectivesandGoals()
+
+/mob/living/simple_animal/revenant/proc/giveObjectivesandGoals()
to_chat(src, "
")
to_chat(src, "You are a revenant.")
to_chat(src, "Your formerly mundane spirit has been infused with alien energies and empowered into a revenant.")
@@ -132,22 +143,15 @@
to_chat(src, "To function, you are to drain the life essence from humans. This essence is a resource, as well as your health, and will power all of your abilities.")
to_chat(src, "You do not remember anything of your past lives, nor will you remember anything about this one after your death.")
to_chat(src, "Be sure to read the wiki page at http://nanotrasen.se/wiki/index.php/Revenant to learn more.")
-
var/datum/objective/revenant/objective = new
- objective.owner = src.mind
- src.mind.objectives += objective
+ objective.owner = mind
+ mind.objectives += objective
to_chat(src, "Objective #1: [objective.explanation_text]")
var/datum/objective/revenantFluff/objective2 = new
- objective2.owner = src.mind
- src.mind.objectives += objective2
+ objective2.owner = mind
+ mind.objectives += objective2
to_chat(src, "Objective #2: [objective2.explanation_text]")
- ticker.mode.traitors |= src.mind //Necessary for announcing
- if(!src.giveSpells())
- message_admins("Revenant was created but has no mind. Trying again in five seconds.")
- spawn(50)
- if(!src.giveSpells())
- message_admins("Revenant still has no mind. Deleting...")
- qdel(src)
+ ticker.mode.traitors |= mind //Necessary for announcing
/mob/living/simple_animal/revenant/proc/giveSpells()
if(src.mind)
From 2607eac734a66c1a6566c0b8e012dfd6656cde17 Mon Sep 17 00:00:00 2001
From: variableundefined <40092670+variableundefined@users.noreply.github.com>
Date: Sat, 13 Oct 2018 22:33:32 +0800
Subject: [PATCH 2/5] Fixes missing sound
---
code/game/gamemodes/miniantags/revenant/revenant.dm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index ce1f5fc980b..21d35be839b 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -125,9 +125,9 @@
giveObjectivesandGoals()
if(!giveSpells())
message_admins("Revenant was created but has no mind. Trying again in ten seconds.")
- addtimer(CALLBACK(src, .proc/tryGiveinTen), 100)
+ addtimer(CALLBACK(src, .proc/giveSpellsObjectivesordelete), 100)
-/mob/living/simple_animal/revenant/proc/tryGiveinTen()
+/mob/living/simple_animal/revenant/proc/giveSpellsObjectivesordelete()
if(!giveSpells())
message_admins("Revenant still has no mind. Deleting...")
qdel(src)
@@ -135,6 +135,8 @@
giveObjectivesandGoals()
/mob/living/simple_animal/revenant/proc/giveObjectivesandGoals()
+ mind.wipe_memory()
+ SEND_SOUND(src, 'sound/effects/ghost.ogg')
to_chat(src, "
")
to_chat(src, "You are a revenant.")
to_chat(src, "Your formerly mundane spirit has been infused with alien energies and empowered into a revenant.")
From 6e70f1eed313a1c7b4fae5359573f360750394ad Mon Sep 17 00:00:00 2001
From: variableundefined <40092670+variableundefined@users.noreply.github.com>
Date: Mon, 15 Oct 2018 18:35:11 +0800
Subject: [PATCH 3/5] SECONDS
---
code/game/gamemodes/miniantags/revenant/revenant.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index 21d35be839b..1969aaaaab9 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -125,7 +125,7 @@
giveObjectivesandGoals()
if(!giveSpells())
message_admins("Revenant was created but has no mind. Trying again in ten seconds.")
- addtimer(CALLBACK(src, .proc/giveSpellsObjectivesordelete), 100)
+ addtimer(CALLBACK(src, .proc/giveSpellsObjectivesordelete), 10 SECONDS)
/mob/living/simple_animal/revenant/proc/giveSpellsObjectivesordelete()
if(!giveSpells())
From 4869767d57da5060da94bbef3a0b62ec7b82a324 Mon Sep 17 00:00:00 2001
From: variableundefined <40092670+variableundefined@users.noreply.github.com>
Date: Thu, 18 Oct 2018 10:45:07 +0800
Subject: [PATCH 4/5] Revvie fixes
---
.../gamemodes/miniantags/revenant/revenant.dm | 52 ++++++++++++-------
1 file changed, 32 insertions(+), 20 deletions(-)
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index 1969aaaaab9..16b39ab9911 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -120,19 +120,33 @@
updateallghostimages()
remove_from_all_data_huds()
- spawn(5)
- if(mind)
- giveObjectivesandGoals()
- if(!giveSpells())
- message_admins("Revenant was created but has no mind. Trying again in ten seconds.")
- addtimer(CALLBACK(src, .proc/giveSpellsObjectivesordelete), 10 SECONDS)
-
-/mob/living/simple_animal/revenant/proc/giveSpellsObjectivesordelete()
- if(!giveSpells())
- message_admins("Revenant still has no mind. Deleting...")
- qdel(src)
- else
+ addtimer(CALLBACK(src, .proc/firstSetupAttempt), 15 SECONDS) // Give admin 10 seconds to put in a ghost (Or wait 10 seconds before giving it objectives)
+
+
+/mob/living/simple_animal/revenant/proc/firstSetupAttempt()
+ if(mind)
giveObjectivesandGoals()
+ giveSpells()
+ else
+ message_admins("Revenant was created but has no mind. Put a ghost inside, or a poll will be made in one minute.")
+ addtimer(CALLBACK(src, .proc/setupOrDelete), 1 MINUTES)
+
+/mob/living/simple_animal/revenant/proc/setupOrDelete()
+ if(mind)
+ giveObjectivesandGoals()
+ giveSpells()
+ else
+ var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [real_name]?", poll_time = 15 SECONDS)
+ var/mob/dead/observer/theghost = null
+ if(candidates.len)
+ theghost = pick(candidates)
+ message_admins("[key_name_admin(theghost)] has taken control of a revenant created without a mind")
+ key = theghost.key
+ giveObjectivesandGoals()
+ giveSpells()
+ else
+ message_admins("No ghost was willing to take control of a mindless revenant. Deleting...")
+ qdel(src)
/mob/living/simple_animal/revenant/proc/giveObjectivesandGoals()
mind.wipe_memory()
@@ -156,14 +170,12 @@
ticker.mode.traitors |= mind //Necessary for announcing
/mob/living/simple_animal/revenant/proc/giveSpells()
- if(src.mind)
- src.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision/revenant(null))
- src.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/revenant_transmit(null))
- src.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/overload(null))
- src.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/defile(null))
- src.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/malfunction(null))
- return 1
- return 0
+ mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision/revenant(null))
+ mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/revenant_transmit(null))
+ mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/overload(null))
+ mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/defile(null))
+ mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/malfunction(null))
+ return TRUE
/mob/living/simple_animal/revenant/dust()
From 2771c17a0c69ba09b811e12d57ef8b636713fd4d Mon Sep 17 00:00:00 2001
From: variableundefined <40092670+variableundefined@users.noreply.github.com>
Date: Sun, 21 Oct 2018 09:45:41 +0800
Subject: [PATCH 5/5] Fixes inconsistent comment and no name on revenant prompt
---
code/game/gamemodes/miniantags/revenant/revenant.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index 16b39ab9911..b85a908c6a2 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -120,7 +120,7 @@
updateallghostimages()
remove_from_all_data_huds()
- addtimer(CALLBACK(src, .proc/firstSetupAttempt), 15 SECONDS) // Give admin 10 seconds to put in a ghost (Or wait 10 seconds before giving it objectives)
+ addtimer(CALLBACK(src, .proc/firstSetupAttempt), 15 SECONDS) // Give admin 15 seconds to put in a ghost (Or wait 15 seconds before giving it objectives)
/mob/living/simple_animal/revenant/proc/firstSetupAttempt()
@@ -136,7 +136,7 @@
giveObjectivesandGoals()
giveSpells()
else
- var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [real_name]?", poll_time = 15 SECONDS)
+ var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a revenant?", poll_time = 15 SECONDS)
var/mob/dead/observer/theghost = null
if(candidates.len)
theghost = pick(candidates)