mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Merge pull request #12778 from AnturK/minor_upgrades
Mech Speech Bubbles, POI list for Observe
This commit is contained in:
@@ -368,13 +368,13 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
else . = pick(ais)
|
||||
return .
|
||||
|
||||
//Returns a list of all mobs with their name
|
||||
/proc/getmobs()
|
||||
|
||||
//Returns a list of all items of interest with their name
|
||||
/proc/getpois(mobs_only=0)
|
||||
var/list/mobs = sortmobs()
|
||||
var/list/names = list()
|
||||
var/list/creatures = list()
|
||||
var/list/pois = list()
|
||||
var/list/namecounts = list()
|
||||
|
||||
for(var/mob/M in mobs)
|
||||
var/name = M.name
|
||||
if (name in names)
|
||||
@@ -390,10 +390,22 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
name += " \[ghost\]"
|
||||
else
|
||||
name += " \[dead\]"
|
||||
creatures[name] = M
|
||||
pois[name] = M
|
||||
|
||||
return creatures
|
||||
if(!mobs_only)
|
||||
for(var/atom/A in poi_list)
|
||||
if(!A || !A.loc)
|
||||
continue
|
||||
var/name = A.name
|
||||
if (names.Find(name))
|
||||
namecounts[name]++
|
||||
name = "[name] ([namecounts[name]])"
|
||||
else
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
pois[name] = A
|
||||
|
||||
return pois
|
||||
//Orders mobs by type then by name
|
||||
/proc/sortmobs()
|
||||
var/list/moblist = list()
|
||||
|
||||
@@ -16,3 +16,4 @@ var/global/list/table_recipes = list() //list of all table craft recipes
|
||||
var/global/list/rcd_list = list() //list of Rapid Construction Devices.
|
||||
var/global/list/apcs_list = list() //list of all Area Power Controller machines, seperate from machines for powernet speeeeeeed.
|
||||
var/global/list/tracked_implants = list() //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented...
|
||||
var/global/list/poi_list = list() //list of points of interest for observe/follow
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
/datum/game_mode/nuclear/declare_completion()
|
||||
var/disk_rescued = 1
|
||||
for(var/obj/item/weapon/disk/nuclear/D in world)
|
||||
for(var/obj/item/weapon/disk/nuclear/D in poi_list)
|
||||
if(!D.onCentcom())
|
||||
disk_rescued = 0
|
||||
break
|
||||
|
||||
@@ -411,6 +411,7 @@ This is here to make the tiles around the station mininuke change when it's arme
|
||||
|
||||
/obj/item/weapon/disk/nuclear/New()
|
||||
..()
|
||||
poi_list |= src
|
||||
SSobj.processing |= src
|
||||
|
||||
/obj/item/weapon/disk/nuclear/process()
|
||||
@@ -421,6 +422,7 @@ This is here to make the tiles around the station mininuke change when it's arme
|
||||
|
||||
/obj/item/weapon/disk/nuclear/Destroy()
|
||||
if(blobstart.len > 0)
|
||||
poi_list.Remove(src)
|
||||
var/obj/item/weapon/disk/nuclear/NEWDISK = new(pick(blobstart))
|
||||
transfer_fingerprints_to(NEWDISK)
|
||||
var/turf/diskturf = get_turf(src)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
layer = MOB_LAYER - 0.2//icon draw layer
|
||||
infra_luminosity = 15 //byond implementation is bugged.
|
||||
force = 5
|
||||
flags = HEAR
|
||||
var/can_move = 1
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/step_in = 10 //make a step in step_in/10 sec.
|
||||
@@ -78,7 +79,6 @@
|
||||
|
||||
hud_possible = list (DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD)
|
||||
|
||||
|
||||
/obj/mecha/New()
|
||||
..()
|
||||
events = new
|
||||
@@ -90,6 +90,7 @@
|
||||
spark_system.attach(src)
|
||||
add_cell()
|
||||
SSobj.processing |= src
|
||||
poi_list |= src
|
||||
log_message("[src.name] created.")
|
||||
mechas_list += src //global mech list
|
||||
prepare_huds()
|
||||
@@ -139,6 +140,7 @@
|
||||
if(internal_tank)
|
||||
qdel(internal_tank)
|
||||
SSobj.processing.Remove(src)
|
||||
poi_list.Remove(src)
|
||||
equipment.Cut()
|
||||
cell = null
|
||||
internal_tank = null
|
||||
@@ -333,8 +335,16 @@
|
||||
return
|
||||
|
||||
/obj/mecha/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans)
|
||||
if(speaker == occupant && radio.broadcasting)
|
||||
radio.talk_into(speaker, text, , spans)
|
||||
if(speaker == occupant)
|
||||
if(radio.broadcasting)
|
||||
radio.talk_into(speaker, text, , spans)
|
||||
//flick speech bubble
|
||||
var/list/speech_bubble_recipients = list()
|
||||
for(var/mob/M in get_hearers_in_view(7,src))
|
||||
if(M.client)
|
||||
speech_bubble_recipients.Add(M.client)
|
||||
spawn(0)
|
||||
flick_overlay(image('icons/mob/talk.dmi', src, "hR[say_test(raw_message)]",MOB_LAYER+1), speech_bubble_recipients, 30)
|
||||
return
|
||||
|
||||
////////////////////////////
|
||||
|
||||
@@ -125,7 +125,7 @@ var/list/freqtospan = list(
|
||||
output = "[output]'>"
|
||||
return output
|
||||
|
||||
/mob/living/proc/say_test(text)
|
||||
/proc/say_test(text)
|
||||
var/ending = copytext(text, length(text))
|
||||
if (ending == "?")
|
||||
return "1"
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
else
|
||||
dat += "<tr><td><i>Nuclear Operative not found!</i></td></tr>"
|
||||
dat += "</table><br><table><tr><td><B>Nuclear Disk(s)</B></td></tr>"
|
||||
for(var/obj/item/weapon/disk/nuclear/N in world)
|
||||
for(var/obj/item/weapon/disk/nuclear/N in poi_list)
|
||||
dat += "<tr><td>[N.name], "
|
||||
var/atom/disk_loc = N.loc
|
||||
while(!istype(disk_loc, /turf))
|
||||
|
||||
@@ -207,7 +207,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Orbit" // "Haunt"
|
||||
set desc = "Follow and orbit a mob."
|
||||
|
||||
var/list/mobs = getmobs()
|
||||
var/list/mobs = getpois()
|
||||
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
|
||||
var/mob/target = mobs[input]
|
||||
ManualFollow(target)
|
||||
@@ -246,7 +246,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/list/dest = list() //List of possible destinations (mobs)
|
||||
var/target = null //Chosen target.
|
||||
|
||||
dest += getmobs() //Fill list, prompt user with list
|
||||
dest += getpois(mobs_only=1) //Fill list, prompt user with list
|
||||
target = input("Please, select a player!", "Jump to Mob", null, null) as null|anything in dest
|
||||
|
||||
if (!target)//Make sure we actually have a target
|
||||
|
||||
@@ -539,55 +539,7 @@ var/list/slot_equipment_priority = list( \
|
||||
if(is_admin && stat == DEAD)
|
||||
is_admin = 0
|
||||
|
||||
var/list/names = list()
|
||||
var/list/namecounts = list()
|
||||
var/list/creatures = 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
|
||||
|
||||
if(istype(O, /obj/machinery/bot))
|
||||
var/name = "BOT: [O.name]"
|
||||
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 sortNames(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
|
||||
|
||||
var/list/creatures = getpois()
|
||||
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
src.energy = starting_energy
|
||||
..()
|
||||
SSobj.processing |= src
|
||||
poi_list |= src
|
||||
for(var/obj/machinery/power/singularity_beacon/singubeacon in machines)
|
||||
if(singubeacon.active)
|
||||
target = singubeacon
|
||||
@@ -42,6 +43,7 @@
|
||||
|
||||
/obj/singularity/Destroy()
|
||||
SSobj.processing.Remove(src)
|
||||
poi_list.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/singularity/Move(atom/newloc, direct)
|
||||
|
||||
Reference in New Issue
Block a user