Update necropolis_chests.dm
This commit is contained in:
@@ -787,30 +787,30 @@
|
||||
/obj/item/melee/ghost_sword/process()
|
||||
ghost_check()
|
||||
|
||||
/obj/item/melee/ghost_sword/proc/ghost_check()
|
||||
var/ghost_counter = 0
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/contents = T.GetAllContents()
|
||||
var/mob/dead/observer/current_spirits = list()
|
||||
for(var/thing in contents)
|
||||
var/atom/A = thing
|
||||
A.transfer_observers_to(src)
|
||||
|
||||
for(var/i in orbiters?.orbiters)
|
||||
/obj/item/melee/ghost_sword/proc/recursive_orbit_collect(atom/A, list/L)
|
||||
for(var/i in A.orbiters?.orbiters)
|
||||
if(!isobserver(i))
|
||||
continue
|
||||
L += i
|
||||
recursive_orbit_collect(i, L)
|
||||
|
||||
/obj/item/melee/ghost_sword/proc/ghost_check()
|
||||
var/list/mob/dead/observer/current_spirits = list()
|
||||
|
||||
recursive_orbit_collect(src, current_spirits)
|
||||
recursive_orbit_collect(loc, current_spirits) //anything holding us
|
||||
|
||||
for(var/i in spirits - current_spirits)
|
||||
var/mob/dead/observer/G = i
|
||||
ghost_counter++
|
||||
G.invisibility = 0
|
||||
current_spirits |= G
|
||||
|
||||
for(var/mob/dead/observer/G in spirits - current_spirits)
|
||||
G.invisibility = GLOB.observer_default_invisibility
|
||||
|
||||
|
||||
for(var/i in current_spirits)
|
||||
var/mob/dead/observer/G = i
|
||||
G.invisibility = 0
|
||||
|
||||
spirits = current_spirits
|
||||
|
||||
return ghost_counter
|
||||
|
||||
return length(spirits)
|
||||
|
||||
/obj/item/melee/ghost_sword/attack(mob/living/target, mob/living/carbon/human/user)
|
||||
force = 0
|
||||
var/ghost_counter = ghost_check()
|
||||
@@ -1335,4 +1335,4 @@
|
||||
if(2)
|
||||
new /obj/item/wisp_lantern(src)
|
||||
if(3)
|
||||
new /obj/item/prisoncube(src)
|
||||
new /obj/item/prisoncube(src)
|
||||
|
||||
Reference in New Issue
Block a user