diff --git a/code/_onclick/ventcrawl.dm b/code/_onclick/ventcrawl.dm
index ac4091c0192..b8839c1a239 100644
--- a/code/_onclick/ventcrawl.dm
+++ b/code/_onclick/ventcrawl.dm
@@ -57,7 +57,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
return 0
/mob/living/var/ventcrawl_layer = PIPING_LAYER_DEFAULT
-
+
/mob/living/proc/handle_ventcrawl(var/atom/clicked_on)
diary << "[src] is ventcrawling."
if(!stat)
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 62369ccddfb..df2598115ed 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -514,12 +514,16 @@ Status: []
"},
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,48 +573,60 @@ Status: []
"},
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
+ 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
+ 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)
- else
- spawn() popDown()
+ spawn()
+ popDown()
-/obj/machinery/porta_turret/proc
- popUp() // pops the turret up
- if(disabled)
- return
- if(raising || raised) return
- if(stat & BROKEN) return
- invisibility=0
- raising=1
- flick("popup",cover)
- sleep(5)
- sleep(5)
- raising=0
- cover.icon_state="openTurretCover"
- raised=1
- layer=4
- popDown() // pops the turret down
- if(disabled)
- return
- if(raising || !raised) return
- if(stat & BROKEN) return
- layer=3
- raising=1
- flick("popdown",cover)
- sleep(10)
- raising=0
- cover.icon_state="turretCover"
- raised=0
- invisibility=2
- icon_state="[lasercolor]grey_target_prism"
+/obj/machinery/porta_turret/proc/popUp() // pops the turret up
+ if(disabled)
+ return
+ if(raising || raised) return
+ if(stat & BROKEN) return
+ invisibility=0
+ raising=1
+ flick("popup",cover)
+ playsound(get_turf(src), 'sound/effects/turret/open.wav', 60, 1)
+ sleep(5)
+ sleep(5)
+ raising=0
+ cover.icon_state="openTurretCover"
+ raised=1
+ layer=4
+
+/obj/machinery/porta_turret/proc/popDown() // pops the turret down
+ if(disabled)
+ return
+ if(raising || !raised) return
+ if(stat & BROKEN) return
+ 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"
+ raised=0
+ invisibility=2
+ icon_state="[lasercolor]grey_target_prism"
/obj/machinery/porta_turret/proc/assess_perp(mob/living/carbon/human/perp as mob)
@@ -1114,6 +1130,7 @@ Status: []
"},
user << "Access denied."
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()
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
index 93798b590fd..eb0c7b7db6d 100644
--- a/code/game/machinery/turrets.dm
+++ b/code/game/machinery/turrets.dm
@@ -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)
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 29125864c7f..37d7b70de41 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -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
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index a6d61bec7b2..be8c63881de 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -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
diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm
index 458b68774f7..4d2f1637cb6 100644
--- a/code/modules/mob/living/carbon/brain/MMI.dm
+++ b/code/modules/mob/living/carbon/brain/MMI.dm
@@ -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]")
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index d8ca4994feb..a854740c58b 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -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)
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 62b26a0b149..546c2116bd8 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -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
diff --git a/code/modules/spells/targeted/ethereal_jaunt.dm b/code/modules/spells/targeted/ethereal_jaunt.dm
index d131db0a2ed..9a071e568be 100644
--- a/code/modules/spells/targeted/ethereal_jaunt.dm
+++ b/code/modules/spells/targeted/ethereal_jaunt.dm
@@ -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()
diff --git a/code/setup.dm b/code/setup.dm
index e7b2828fce8..3bfcd1d2662 100644
--- a/code/setup.dm
+++ b/code/setup.dm
@@ -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
diff --git a/code/unused/gamemodes/ruby.dm b/code/unused/gamemodes/ruby.dm
index 26a47f82ccb..5a8a4ede745 100644
--- a/code/unused/gamemodes/ruby.dm
+++ b/code/unused/gamemodes/ruby.dm
@@ -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
*/
diff --git a/html/changelogs/DeityLink_5947.yml b/html/changelogs/DeityLink_5947.yml
new file mode 100644
index 00000000000..6f3fa8fda48
--- /dev/null
+++ b/html/changelogs/DeityLink_5947.yml
@@ -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.