Merge remote-tracking branch 'upstream/dev-freeze' into dev

This commit is contained in:
PsiOmega
2014-12-14 00:27:16 +01:00
22 changed files with 300 additions and 260 deletions

View File

@@ -83,18 +83,7 @@
/mob/dead/attackby(obj/item/W, mob/user)
if(istype(W,/obj/item/weapon/book/tome))
var/mob/dead/M = src
if(src.invisibility != 0)
M.invisibility = 0
user.visible_message( \
"\red [user] drags ghost, [M], to our plan of reality!", \
"\red You drag [M] to our plan of reality!" \
)
else
user.visible_message ( \
"\red [user] just tried to smash his book into that ghost! It's not very effective", \
"\red You get the feeling that the ghost can't become any more visible." \
)
M.manifest(user)
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
return 1
@@ -556,9 +545,23 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A]</span>")
return 1
/mob/dead/proc/manifest()
verbs += /mob/dead/proc/toggle_visibility
toggle_visibility()
/mob/dead/proc/manifest(mob/user)
var/is_manifest = 0
if(!is_manifest)
is_manifest = 1
verbs += /mob/dead/proc/toggle_visibility
if(src.invisibility != 0)
user.visible_message( \
"<span class='warning'>[user] drags ghost, [src], to our plan of reality!</span>", \
"<span class='warning'>You drag [src] to our plan of reality!</span>" \
)
toggle_visibility(1)
else
user.visible_message ( \
"<span class='warning'>[user] just tried to smash his book into that ghost! It's not very effective.</span>", \
"<span class='warning'>You get the feeling that the ghost can't become any more visible.</span>" \
)
/mob/dead/proc/toggle_icon(var/icon)
if(!client)
@@ -574,22 +577,21 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon)
client.images += J
/mob/dead/proc/toggle_visibility()
/mob/dead/proc/toggle_visibility(var/forced = 0)
set category = "Ghost"
set name = "Toggle Visibility"
set desc = "Allows you to turn (in)visible (almost) at will."
var/toggled_invisible
if(invisibility && world.time < toggled_invisible + 600)
if(!forced && invisibility && world.time < toggled_invisible + 600)
src << "You must gather strength before you can turn visible again..."
return
if(invisibility == 0)
toggled_invisible = world.time
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible</span>")
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible.</span>")
else
src << "<span class='info'>You are now visible</span>"
src << "<span class='info'>You are now visible!</span>"
invisibility = invisibility == INVISIBILITY_OBSERVER ? 0 : INVISIBILITY_OBSERVER
// Give the ghost a cult icon which should be visible only to itself

View File

@@ -88,8 +88,12 @@
if(wrapped) //Already have an item.
//Temporary put wrapped into user so target's attackby() checks pass.
wrapped.loc = user
//Pass the attack on to the target. This might delete/relocate wrapped.
wrapped.afterattack(target,user)
var/resolved = target.attackby(wrapped,user)
if(!resolved && wrapped && target)
wrapped.afterattack(target,user,1)
//If wrapped was neither deleted nor put into target, put it back into the gripper.
if(wrapped && user && (wrapped.loc == user))
wrapped.loc = src

View File

@@ -89,17 +89,17 @@
/mob/living/simple_animal/hostile/proc/AttackingTarget()
if(!Adjacent(target_mob))
return
//if(isliving(target_mob))
//var/mob/living/L = target_mob
//L.attack_animal(src)
//return L
//if(istype(target_mob,/obj/mecha))
//var/obj/mecha/M = target_mob
//M.attack_animal(src)
//return M
//if(istype(target_mob,/obj/machinery/bot))
//var/obj/machinery/bot/B = target_mob
//B.attack_animal(src)
if(isliving(target_mob))
var/mob/living/L = target_mob
L.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
return L
if(istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob
M.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
return M
if(istype(target_mob,/obj/machinery/bot))
var/obj/machinery/bot/B = target_mob
B.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
/mob/living/simple_animal/hostile/proc/LoseTarget()
stance = HOSTILE_STANCE_IDLE
@@ -193,10 +193,10 @@
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
if(prob(break_stuff_probability))
for(var/dir in cardinal) // North, South, East, West
//for(var/obj/structure/window/obstacle in get_step(src, dir))
//if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order
//obstacle.attack_animal(src)
//return
//var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
//if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
//obstacle.attack_animal(src)
for(var/obj/structure/window/obstacle in get_step(src, dir))
if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order
obstacle.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
return
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
obstacle.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)