Turned remote talk into a spell and optimized it, giving it it's action button

This commit is contained in:
ZomgPonies
2014-07-18 02:38:53 -04:00
parent f0d38e1845
commit 4ad8b741a2
4 changed files with 37 additions and 75 deletions
+3 -1
View File
@@ -243,8 +243,10 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
for(var/mob/living/target in view_or_range(range, user, selection_type))
targets += target
if(1) //single target can be picked
if(range < 0)
if(range == -1)
targets += user
else if(range == -2)
targets += input("Choose the target for the spell.", "Targeting") as mob in living_mob_list
else
var/possible_targets = list()
-46
View File
@@ -42,19 +42,6 @@
New()
block=INCREASERUNBLOCK
/datum/dna/gene/basic/remotetalk
name="Telepathy"
activation_messages=list("You expand your mind outwards.")
mutation=M_REMOTE_TALK
instability=1
New()
block=REMOTETALKBLOCK
activate(var/mob/M, var/connected, var/flags)
..(M,connected,flags)
M.verbs += /mob/living/carbon/human/proc/remotesay
/datum/dna/gene/basic/heat_resist
name="Heat Resistance"
@@ -137,39 +124,6 @@
..(M,connected,flags)
M.pass_flags |= 1
/* OLD HULK BEHAVIOR
/datum/dna/gene/basic/hulk
name="Hulk"
activation_messages=list("Your muscles hurt.")
mutation=M_HULK
New()
block=HULKBLOCK
can_activate(var/mob/M,var/flags)
// Can't be big AND small.
if(M_DWARF in M.mutations)
return 0
return ..(M,flags)
OnDrawUnderlays(var/mob/M,var/g,var/fat)
if(M_HULK in M.mutations)
if(fat)
return "hulk_[fat]_s"
else
return "hulk_[g]_s"
return 0
OnMobLife(var/mob/living/carbon/human/M)
if(!istype(M)) return
if(M.health <= 25)
M.mutations.Remove(M_HULK)
M.dna.SetSEState(HULKBLOCK,0)
M.update_mutations() //update our mutation overlays
M << "\red You suddenly feel very weak."
M.Weaken(3)
M.emote("collapse")
*/
/datum/dna/gene/basic/xray
name="X-Ray Vision"
activation_messages=list("The walls suddenly disappear.")
+34 -27
View File
@@ -193,37 +193,44 @@ Obviously, requires DNA2.
M.visible_message("\blue \The [src] morphs and changes [M.get_visible_gender() == MALE ? "his" : M.get_visible_gender() == FEMALE ? "her" : "their"] appearance!", "\blue You change your appearance!", "\red Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!")
/datum/dna/gene/basic/grant_spell/remotetalk
name="Telepathy"
activation_messages=list("You expand your mind outwards.")
mutation=M_REMOTE_TALK
instability=1
spelltype =/obj/effect/proc_holder/spell/targeted/remotetalk
New()
block=REMOTETALKBLOCK
/obj/effect/proc_holder/spell/targeted/remotetalk
name = "Project Mind"
desc = "Make people understand your thoughts at any range!"
charge_max = 1800
clothes_req = 0
stat_allowed = 0
invocation_type = "none"
range = -2
selection_type = "range"
icon_power_button = "genetic_remotetalk"
/mob/living/carbon/human/proc/remotesay()
set name = "Project mind"
set category = "Abilities"
if(stat!=CONSCIOUS)
reset_view(0)
remoteview_target = null
return
if(!(M_REMOTE_TALK in src.mutations))
src.verbs -= /mob/living/carbon/human/proc/remotesay
return
var/list/creatures = list()
for(var/mob/living/carbon/human/h in world)
creatures += h
var/mob/target = input ("Who do you want to project your mind to ?") as null|anything in creatures
if (isnull(target))
return
/obj/effect/proc_holder/spell/targeted/remotetalk/cast(list/targets)
if(!ishuman(usr)) return
var/say = input ("What do you wish to say")
if(M_REMOTE_TALK in target.mutations)
target.show_message("\blue You hear [src.real_name]'s voice: [say]")
else
target.show_message("\blue You hear a voice that seems to echo around the room: [say]")
usr.show_message("\blue You project your mind into [target.real_name]: [say]")
for(var/mob/dead/observer/G in world)
G.show_message("<i>Telepathic message from <b>[src]</b> to <b>[target]</b>: [say]</i>")
for(var/mob/living/target in targets)
if(M_REMOTE_TALK in target.mutations)
target.show_message("\blue You hear [usr.real_name]'s voice: [say]")
else
target.show_message("\blue You hear a voice that seems to echo around the room: [say]")
usr.show_message("\blue You project your mind into [target.real_name]: [say]")
for(var/mob/dead/observer/G in player_list)
G.show_message("<i>Telepathic message from <b>[usr]</b> to <b>[target]</b>: [say]</i>")
/mob/living/carbon/human/proc/remoteobserve()
set name = "Remote View"
@@ -47,7 +47,6 @@
/mob/living/carbon/human/grey/New(var/new_loc)
..(new_loc, "Grey")
mutations.Add(M_REMOTE_TALK)
verbs += /mob/living/carbon/human/proc/remotesay
/mob/living/carbon/human/human/New(var/new_loc)
..(new_loc, "Human")