mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-29 11:31:51 +00:00
@@ -419,56 +419,26 @@
|
||||
if(is_admin && stat == DEAD)
|
||||
is_admin = 0
|
||||
|
||||
var/list/names = list()
|
||||
var/list/namecounts = list()
|
||||
var/list/creatures = list()
|
||||
var/list/targets = list()
|
||||
|
||||
for(var/obj/O in world) //EWWWWWWWWWWWWWWWWWWWWWWWW ~needs to be optimised
|
||||
if(!O.loc)
|
||||
continue
|
||||
if(istype(O, /obj/item/weapon/disk/nuclear))
|
||||
var/name = "Nuclear Disk"
|
||||
if (names.Find(name))
|
||||
namecounts[name]++
|
||||
name = "[name] ([namecounts[name]])"
|
||||
else
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
creatures[name] = O
|
||||
|
||||
if(istype(O, /obj/singularity))
|
||||
var/name = "Singularity"
|
||||
if (names.Find(name))
|
||||
namecounts[name]++
|
||||
name = "[name] ([namecounts[name]])"
|
||||
else
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
creatures[name] = O
|
||||
|
||||
for(var/mob/M in sortAtom(mob_list))
|
||||
var/name = M.name
|
||||
if (names.Find(name))
|
||||
namecounts[name]++
|
||||
name = "[name] ([namecounts[name]])"
|
||||
else
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
|
||||
creatures[name] = M
|
||||
|
||||
targets += observe_list_format(nuke_disks)
|
||||
targets += observe_list_format(all_singularities)
|
||||
targets += getmobs()
|
||||
targets += observe_list_format(sortAtom(mechas_list))
|
||||
targets += observe_list_format(SSshuttles.ships)
|
||||
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
var/eye_name = null
|
||||
|
||||
var/ok = "[is_admin ? "Admin Observe" : "Observe"]"
|
||||
eye_name = input("Please, select a player!", ok, null, null) as null|anything in creatures
|
||||
eye_name = input("Please, select a player!", ok, null, null) as null|anything in targets
|
||||
|
||||
if (!eye_name)
|
||||
return
|
||||
|
||||
var/mob/mob_eye = creatures[eye_name]
|
||||
var/mob/mob_eye = targets[eye_name]
|
||||
|
||||
if(client && mob_eye)
|
||||
client.eye = mob_eye
|
||||
|
||||
Reference in New Issue
Block a user