mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Ports Janihud rework from Outpost 21. (#9549)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4656423313
commit
b785d48300
@@ -34,3 +34,5 @@
|
||||
/obj/effect/decal/cleanable/chemcoating/update_icon()
|
||||
..()
|
||||
color = reagents.get_color()
|
||||
cut_overlays()
|
||||
add_janitor_hud_overlay()
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/update_icon()
|
||||
color = "#FFFFFF"
|
||||
cut_overlays()
|
||||
add_janitor_hud_overlay()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/up
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1")
|
||||
@@ -30,4 +32,4 @@
|
||||
random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks
|
||||
basecolor = "#05EE05"
|
||||
basecolor = "#05EE05"
|
||||
|
||||
@@ -70,6 +70,8 @@ var/global/list/image/splatter_cache=list()
|
||||
else
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
cut_overlays()
|
||||
add_janitor_hud_overlay()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
|
||||
if(perp.is_incorporeal())
|
||||
@@ -210,6 +212,7 @@ var/global/list/image/splatter_cache=list()
|
||||
icon = blood
|
||||
cut_overlays()
|
||||
add_overlay(giblets)
|
||||
add_janitor_hud_overlay()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot/update_icon()
|
||||
color = "#FFFFFF"
|
||||
cut_overlays()
|
||||
add_janitor_hud_overlay()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot/dry() //pieces of robots do not dry up like
|
||||
return
|
||||
@@ -49,4 +51,4 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/oil/streak
|
||||
random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5")
|
||||
amount = 2
|
||||
amount = 2
|
||||
|
||||
@@ -142,6 +142,7 @@ var/global/list/image/fluidtrack_cache=list()
|
||||
stack[stack_idx]=track
|
||||
add_overlay(I)
|
||||
updatedtracks=0 // Clear our memory of updated tracks.
|
||||
add_janitor_hud_overlay()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/footprints
|
||||
name = "wet footprints"
|
||||
|
||||
@@ -12,7 +12,6 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for
|
||||
var/generic_filth = FALSE
|
||||
var/age = 0
|
||||
var/list/random_icon_states = list()
|
||||
var/obj/effect/decal/jan_hud/jan_icon = null
|
||||
|
||||
/obj/effect/decal/cleanable/Initialize(var/mapload, var/_age)
|
||||
if(!isnull(_age))
|
||||
@@ -21,12 +20,11 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for
|
||||
src.icon_state = pick(src.random_icon_states)
|
||||
if(!mapload || !CONFIG_GET(flag/persistence_ignore_mapload))
|
||||
SSpersistence.track_value(src, /datum/persistent/filth)
|
||||
jan_icon = new/obj/effect/decal/jan_hud(src.loc)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/Destroy()
|
||||
SSpersistence.forget_value(src, /datum/persistent/filth)
|
||||
QDEL_NULL(jan_icon)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/decal/cleanable/clean_blood(var/ignore = 0)
|
||||
@@ -40,13 +38,25 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for
|
||||
src.icon_state = pick(src.random_icon_states)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/jan_hud
|
||||
plane = PLANE_JANHUD
|
||||
layer = BELOW_MOB_LAYER
|
||||
vis_flags = VIS_HIDE
|
||||
persist_storable = FALSE
|
||||
icon = 'icons/mob/hud.dmi'
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/decal/jan_hud/Initialize()
|
||||
src.icon_state = "janhud[rand(1,9)]"
|
||||
/obj/effect/decal/cleanable/update_icon()
|
||||
// Overrides should not inheret from this, and instead replace it entirely to match this in some form.
|
||||
// add_janitor_hud_overlay() does not pre-cut overlays, so cut_overlays() must be called first.
|
||||
// This is so it may be used with update_icon() overrides that use overlays, while adding the janitor overlay at the end.
|
||||
cut_overlays()
|
||||
add_janitor_hud_overlay()
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/proc/add_janitor_hud_overlay()
|
||||
// This was original a seperate object that followed the grime, it got stuck in everything you can imagine!
|
||||
// It also likely doubled the memory use of every cleanable decal on station...
|
||||
var/image/hud = image('icons/mob/hud.dmi', src, "janhud[rand(1,9)]")
|
||||
hud.appearance_flags = (RESET_COLOR|PIXEL_SCALE|KEEP_APART)
|
||||
hud.plane = PLANE_JANHUD
|
||||
hud.layer = BELOW_MOB_LAYER
|
||||
hud.mouse_opacity = 0
|
||||
//HUD VARIANT: Allows the hud to show up with it's normal alpha, even if the 'dirty thing' it's attached to has a low alpha (ex: dirt). If you want to disable it, simply comment out the lines between the 'HUD VARIANT' tag!
|
||||
hud.appearance_flags = RESET_ALPHA
|
||||
hud.alpha = 255
|
||||
//HUD VARIANT end
|
||||
add_overlay(hud)
|
||||
|
||||
@@ -5,17 +5,15 @@
|
||||
plane = DIRTY_PLANE
|
||||
layer = DIRTY_LAYER
|
||||
anchored = TRUE
|
||||
// CHOMPEdit Start - Pretty much all of this file changed
|
||||
var/art_type
|
||||
var/art_color
|
||||
var/art_shade
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/Initialize(var/ml, main = "#FFFFFF",shade = "#000000",var/type = "rune", new_age = 0)
|
||||
. = ..(ml, new_age) // mapload, age
|
||||
name = type
|
||||
desc = "A [type] drawn in crayon."
|
||||
|
||||
// Persistence vars.
|
||||
// Persistence vars. Unused here but used downstream. If someone updates the persistance code, it's here.
|
||||
art_type = type
|
||||
art_color = main
|
||||
art_shade = shade
|
||||
@@ -26,7 +24,7 @@
|
||||
if("graffiti")
|
||||
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
|
||||
|
||||
update_icon()
|
||||
. = ..(ml, new_age) // mapload, age
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/update_icon()
|
||||
cut_overlays()
|
||||
@@ -39,5 +37,7 @@
|
||||
|
||||
add_overlay(mainOverlay)
|
||||
add_overlay(shadeOverlay)
|
||||
|
||||
add_janitor_hud_overlay()
|
||||
return
|
||||
// CHOMPEdit End
|
||||
|
||||
Reference in New Issue
Block a user