Mobs can be incorporeal (#6791)

* Mobs can be incorporeal

Prevents step noises, getting shot, etc. Basically living ghosts. Feel free to add more places this should check, but I think this is a majority.

* Fix missing incorporeal floatyness
This commit is contained in:
Aronai Sieyes
2020-03-11 01:33:38 -04:00
committed by GitHub
parent 50f798dcc2
commit d391d9ab12
28 changed files with 318 additions and 262 deletions

View File

@@ -242,6 +242,8 @@
// this handles mulebots and vehicles
// and now mobs on fire
/mob/living/carbon/human/Crossed(var/atom/movable/AM)
if(AM.is_incorporeal())
return
if(istype(AM, /mob/living/bot/mulebot))
var/mob/living/bot/mulebot/MB = AM
MB.runOver(src)

View File

@@ -204,6 +204,8 @@
// Handle footstep sounds
/mob/living/carbon/human/handle_footstep(var/turf/T)
if(is_incorporeal())
return
if(!config.footstep_volume || !T.footstep_sounds || !T.footstep_sounds.len)
return
// Future Upgrades - Multi species support

View File

@@ -612,6 +612,9 @@
//Stuff like the xenomorph's plasma regen happens here.
species.handle_environment_special(src)
if(is_incorporeal())
return
//Moved pressure calculations here for use in skip-processing check.
var/pressure = environment.return_pressure()
var/adjusted_pressure = calculate_affecting_pressure(pressure)

View File

@@ -54,7 +54,9 @@
icon_rest = "mouse_[body_color]_sleep"
desc = "A small [body_color] rodent, often seen hiding in maintenance areas and making a nuisance of itself."
/mob/living/simple_mob/animal/passive/mouse/Crossed(AM as mob|obj)
/mob/living/simple_mob/animal/passive/mouse/Crossed(atom/movable/AM as mob|obj)
if(AM.is_incorporeal())
return
if( ishuman(AM) )
if(!stat)
var/mob/M = AM

View File

@@ -385,6 +385,9 @@
///Return 1 for movement 0 for none
/mob/proc/Process_Spacemove(var/check_drift = 0)
if(is_incorporeal())
return
if(!Check_Dense_Object()) //Nothing to push off of so end here
update_floating(0)
return 0