ethereal fixes and changelog 5947

This commit is contained in:
DeityLink
2015-10-04 08:47:01 +02:00
parent 841cb6a56f
commit 087530a815
12 changed files with 97 additions and 48 deletions

View File

@@ -514,12 +514,16 @@ Status: []<BR>"},
for(var/mob/living/simple_animal/C in view(7,src))
if(C.stat)
continue
if(C.flags & INVULNERABLE)
continue
// Ignore lazarus-injected mobs.
if(dd_hasprefix(C.faction, "lazarus"))
continue
targets += C
for (var/mob/living/carbon/C in view(7,src)) // loops through all living carbon-based lifeforms in view(12)
if(C.flags & INVULNERABLE)
continue
if(istype(C, /mob/living/carbon/alien) && src.check_anomalies) // git those fukken xenos
if(!C.stat) // if it's dead/dying, there's no need to keep shooting at it.
targets += C
@@ -569,20 +573,30 @@ Status: []<BR>"},
spawn() popUp() // pop the turret up if it's not already up.
dir=get_dir(src,M) // even if you can't shoot, follow the target
spawn() shootAt(M) // shoot the target, finally
if(prob(15))
if(prob(50))
playsound(get_turf(src), 'sound/effects/turret/move1.wav', 60, 1)
else
if(secondarytargets.len>0) // if there are no primary targets, go for secondary targets
playsound(get_turf(src), 'sound/effects/turret/move2.wav', 60, 1)
else if(secondarytargets.len>0) // if there are no primary targets, go for secondary targets
var/mob/t = pick(secondarytargets)
if (istype(t, /mob/living))
if (t.stat!=2)
spawn() popUp()
dir=get_dir(src,t)
shootAt(t)
if(prob(15))
if(prob(50))
playsound(get_turf(src), 'sound/effects/turret/move1.wav', 60, 1)
else
spawn() popDown()
playsound(get_turf(src), 'sound/effects/turret/move2.wav', 60, 1)
else
spawn()
popDown()
/obj/machinery/porta_turret/proc
popUp() // pops the turret up
/obj/machinery/porta_turret/proc/popUp() // pops the turret up
if(disabled)
return
if(raising || raised) return
@@ -590,6 +604,7 @@ Status: []<BR>"},
invisibility=0
raising=1
flick("popup",cover)
playsound(get_turf(src), 'sound/effects/turret/open.wav', 60, 1)
sleep(5)
sleep(5)
raising=0
@@ -597,7 +612,7 @@ Status: []<BR>"},
raised=1
layer=4
popDown() // pops the turret down
/obj/machinery/porta_turret/proc/popDown() // pops the turret down
if(disabled)
return
if(raising || !raised) return
@@ -605,6 +620,7 @@ Status: []<BR>"},
layer=3
raising=1
flick("popdown",cover)
playsound(get_turf(src), 'sound/effects/turret/open.wav', 60, 1)
sleep(10)
raising=0
cover.icon_state="turretCover"
@@ -1114,6 +1130,7 @@ Status: []<BR>"},
user << "<span class='warning'>Access denied.</span>"
else
playsound(get_turf(src), 'sound/weapons/smash.ogg', 60, 1)
Parent_Turret.health -= W.force * 0.5
if (Parent_Turret.health <= 0)
Parent_Turret.die()

View File

@@ -134,6 +134,10 @@
if( !area_T || (area_T.type != protected_area.type) )
protected_area.Exited(T)
return 0 //If the guy is somehow not in the turret's area (teleportation), get them out the damn list. --NEO
if( ismob(T) )
var/mob/M = T
if(M.flags & INVULNERABLE)
return 0
if( iscarbon(T) )
var/mob/living/carbon/MC = T
if( !MC.stat )
@@ -160,7 +164,7 @@
var/list/new_targets = new
var/new_target
for(var/mob/living/carbon/M in protected_area.turretTargets)
if(!M.stat)
if(!M.stat && !(M.flags & INVULNERABLE))
if(!M.lying || lasers)
new_targets += M
for(var/obj/mecha/M in protected_area.turretTargets)
@@ -173,7 +177,7 @@
new_targets += V
for(var/mob/living/simple_animal/M in protected_area.turretTargets)
if(!M.stat)
if(!M.stat && !(M.flags & INVULNERABLE))
new_targets += M
if(new_targets.len)
new_target = pick(new_targets)

View File

@@ -33,7 +33,7 @@
var/antagHUD = 0
var/atom/movable/following = null
var/mob/canclone = null
incorporeal_move = 1
incorporeal_move = INCORPOREAL_GHOST
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF

View File

@@ -145,6 +145,10 @@
//Drops the item in our hand - you can specify an item and a location to drop to
/mob/proc/drop_item(var/obj/item/to_drop, var/atom/Target)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/proc/drop_item() called tick#: [world.time]")
if(!candrop) //can't drop items while etheral
return 0
if(!to_drop) //if we're not told to drop something specific
to_drop = get_active_hand() //drop what we're currently holding

View File

@@ -25,6 +25,11 @@
var/mob/living/silicon/robot = null//Appears unused.
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
obj/item/device/mmi/Destroy()
if(brainmob)
brainmob.ghostize()
..()
// Return true if handled
/obj/item/device/mmi/proc/try_handling_mommi_construction(var/obj/item/O as obj, var/mob/user as mob)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/device/mmi/proc/try_handling_mommi_construction() called tick#: [world.time]")

View File

@@ -537,7 +537,6 @@ var/global/list/animal_count = list() //Stores types, and amount of animals of t
/mob/living/simple_animal/ex_act(severity)
if(flags & INVULNERABLE)
return
..()
switch (severity)
if (1.0)

View File

@@ -102,6 +102,7 @@
var/lying = 0
var/lying_prev = 0
var/canmove = 1
var/candrop = 1
var/lastpuke = 0
var/unacidable = 0
@@ -258,7 +259,7 @@
// /vg/ - Prevent mobs from being moved by a client.
var/deny_client_move = 0
var/incorporeal_move = 0
var/incorporeal_move = INCORPOREAL_DEACTIVATE
//Keeps track of where the mob was spawned. Mostly for teleportation purposes. and no, using initial() doesn't work.
var/origin_x = 0

View File

@@ -29,7 +29,7 @@
/proc/ethereal_jaunt(var/mob/living/target, duration, enteranim = "liquify", exitanim = "reappear", mist = 1)
var/mobloc = get_turf(target)
var/previncorp = target.incorporeal_move //This shouldn't ever matter under usual circumstances
if(target.incorporeal_move == 3) //they're already jaunting, we have another fix for this but this is sane)
if(target.incorporeal_move == INCORPOREAL_ETHEREAL) //they're already jaunting, we have another fix for this but this is sane)
return
target.unlock_from()
//Begin jaunting with an animation
@@ -40,9 +40,12 @@
steam.set_up(10, 0, mobloc)
steam.start()
//Turn on jaunt incorporeal movement, make him invincible and invisible
target.incorporeal_move = 3
target.incorporeal_move = INCORPOREAL_ETHEREAL
target.invisibility = INVISIBILITY_MAXIMUM
target.flags |= INVULNERABLE
var/old_density = target.density
target.density = 0
target.candrop = 0
target.alphas["etheral_jaunt"] = 125 //Spoopy mode to know you are jaunting
target.handle_alpha()
for(var/obj/screen/movable/spell_master/SM in target.spell_masters)
@@ -67,6 +70,8 @@
for(var/obj/screen/movable/spell_master/SM in target.spell_masters)
SM.silence_spells(0)
target.flags &= ~INVULNERABLE
target.density = old_density
target.candrop = 1
target.incorporeal_move = previncorp
target.alphas -= "etheral_jaunt"
target.handle_alpha()

View File

@@ -1243,6 +1243,12 @@ var/proccalls = 1
#define SOUND_AMBIANCE 485 //Literally arbitrary.
//incorporeal_move values
#define INCORPOREAL_DEACTIVATE 0
#define INCORPOREAL_GHOST 1
#define INCORPOREAL_NINJA 2
#define INCORPOREAL_ETHEREAL 3
//MALFUNCTION FLAGS
#define COREFIRERESIST 1

View File

@@ -123,13 +123,13 @@
usr.sight |= SEE_OBJS
usr.sight |= SEE_TURFS
//usr.density = 0
usr.incorporeal_move = 1
usr.incorporeal_move = INCORPOREAL_GHOST
else
usr.sight &= ~SEE_MOBS
usr.sight &= ~SEE_TURFS
usr.sight &= ~SEE_OBJS
usr.density = 1
usr.incorporeal_move = 0
usr.incorporeal_move = INCORPOREAL_DEACTIVATE
src.verbs -= /client/proc/planar_shift
spawn(300) src.verbs += /client/proc/planar_shift
*/

View File

@@ -0,0 +1,8 @@
author: Deity Link
delete-after: true
changes:
- bugfix: you can no longer drop items while ethereal
- bugfix: turrets no longer track/attack you while you are ethereal
- bugfix: projectiles move through you while you are ethereal
- bugfix: added missing sounds to portable turrets
- bugfix: when destroyed, MMI cause the brain inside them to automatically ghost, so they don't get sent to nullspace.