mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Create new mob proc to show radiation, add to verb
This commit is contained in:
@@ -66,8 +66,8 @@
|
||||
if(MODE_RAD)
|
||||
show_rads()
|
||||
|
||||
/obj/item/clothing/glasses/meson/engine/proc/show_rads()
|
||||
var/mob/living/carbon/human/user = loc
|
||||
/mob/proc/show_rads(range)
|
||||
var/mob/user = src
|
||||
var/list/rad_places = list()
|
||||
for(var/datum/component/radioactive/thing in SSradiation.processing)
|
||||
var/atom/owner = thing.parent
|
||||
@@ -79,8 +79,8 @@
|
||||
|
||||
for(var/i in rad_places)
|
||||
var/turf/place = i
|
||||
if(get_dist(user, place) >= range * 5) //Rads are easier to see than wires under the floor
|
||||
continue
|
||||
// if(get_dist(user, place) >= range * 5) //Rads are easier to see than wires under the floor
|
||||
// continue
|
||||
var/strength = round(rad_places[i] / 1000, 0.1)
|
||||
var/image/pic = image(loc = place)
|
||||
var/mutable_appearance/MA = new()
|
||||
@@ -91,6 +91,11 @@
|
||||
pic.appearance = MA
|
||||
flick_overlay(pic, list(user.client), 10)
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/meson/engine/proc/show_rads()
|
||||
var/mob/living/carbon/human/user = loc
|
||||
user.show_rads(range)
|
||||
|
||||
/obj/item/clothing/glasses/meson/engine/update_icon()
|
||||
icon_state = "trayson-[mode]"
|
||||
update_mob()
|
||||
|
||||
@@ -26,6 +26,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
var/image/ghostimage = null //this mobs ghost image, for deleting and stuff
|
||||
var/ghostvision = TRUE //is the ghost able to see things humans can't?
|
||||
var/seedarkness = TRUE
|
||||
var/seerads = FALSE // can the ghost see radiation?
|
||||
var/data_hud_seen = FALSE //this should one of the defines in __DEFINES/hud.dm
|
||||
var/ghost_orbit = GHOST_ORBIT_CIRCLE
|
||||
var/health_scan = FALSE //does the ghost have health scanner mode on? by default it should be off
|
||||
@@ -87,6 +88,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
|
||||
//starts ghosts off with all HUDs.
|
||||
toggle_medHUD()
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
..()
|
||||
|
||||
/mob/dead/observer/Destroy()
|
||||
@@ -97,6 +100,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
if(orbit_menu)
|
||||
SStgui.close_uis(orbit_menu)
|
||||
QDEL_NULL(orbit_menu)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/mob/dead/observer/examine(mob/user)
|
||||
@@ -104,6 +108,11 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
if(!invisibility)
|
||||
. += "It seems extremely obvious."
|
||||
|
||||
/mob/dead/observer/process()
|
||||
if(seerads)
|
||||
show_rads(1)
|
||||
return
|
||||
|
||||
// This seems stupid, but it's the easiest way to avoid absolutely ridiculous shit from happening
|
||||
// Copying an appearance directly from a mob includes it's verb list, it's invisibility, it's alpha, and it's density
|
||||
// You might recognize these things as "fucking ridiculous to put in an appearance"
|
||||
@@ -387,6 +396,21 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(usr, "AntagHud Toggled OFF")
|
||||
M.antagHUD = FALSE
|
||||
|
||||
/mob/dead/observer/verb/toggle_rad_view()
|
||||
set category = "Ghost"
|
||||
set name = "Toggle Radiation View" // "Haunt"
|
||||
set desc = "Toggle viewing radiation ."
|
||||
|
||||
if(!isobserver(src)) // Somehow
|
||||
return
|
||||
|
||||
if(seerads) //remove old huds
|
||||
to_chat(src, "<span class='notice'>Rad view disabled.</span>")
|
||||
seerads = FALSE
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Rad view enabled.</span>")
|
||||
seerads = TRUE
|
||||
|
||||
/mob/dead/observer/verb/set_dnr()
|
||||
set name = "Set DNR"
|
||||
set category = "Ghost"
|
||||
|
||||
Reference in New Issue
Block a user