Port TG emissive appearances (#17194)

* Light

* Righto

* West solar screen was offset by two pixels

* Turns out the optimization makes most matrices moot

* Gotta do it like or else you get upwards of 6 extra atoms instead of 1
This commit is contained in:
Vi3trice
2022-04-12 16:00:35 +01:00
committed by GitHub
parent 90794867f2
commit 0c7552ddb6
19 changed files with 155 additions and 20 deletions
+40
View File
@@ -0,0 +1,40 @@
/**
* Internal atom that copies an appearance on to the blocker plane
*
* This means that the atom in question will block any emissive sprites.
* This should only be used internally. If you are directly creating more of these,
* you're almost guaranteed to be doing something wrong.
*/
/atom/movable/emissive_blocker
name = "emissive blocker"
plane = EMISSIVE_PLANE
layer = FLOAT_LAYER
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
appearance_flags = EMISSIVE_APPEARANCE_FLAGS
/atom/movable/emissive_blocker/Initialize(mapload, source)
. = ..()
verbs.Cut() //Cargo culting from lighting object, this maybe affects memory usage?
render_source = source
color = EM_BLOCK_COLOR
/atom/movable/emissive_blocker/ex_act(severity)
return FALSE
/atom/movable/emissive_blocker/singularity_act()
return
/atom/movable/emissive_blocker/singularity_pull()
return
/atom/movable/emissive_blocker/blob_act()
return
/atom/movable/emissive_blocker/onTransitZ()
return
//Prevents people from moving these after creation, because they shouldn't be.
/atom/movable/emissive_blocker/forceMove(atom/destination, no_tp = FALSE, harderforce = FALSE)
if(harderforce)
return ..()
@@ -3,6 +3,7 @@
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPMINDSHIELD_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,GLAND_HUD)
pressure_resistance = 25
mob_biotypes = MOB_ORGANIC | MOB_HUMANOID
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
//Marking colour and style
var/list/m_colours = DEFAULT_MARKING_COLOURS //All colours set to #000000.
var/list/m_styles = DEFAULT_MARKING_STYLES //All markings set to None.
@@ -533,6 +533,8 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
overlays.Cut() // Force all overlays to regenerate
update_fire()
update_icons()
update_emissive_block()
/* --------------------------------------- */
//vvvvvv UPDATE_INV PROCS vvvvvv
@@ -12,6 +12,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
bubble_icon = "robot"
universal_understand = 1
deathgasp_on_death = TRUE
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
var/sight_mode = 0
var/custom_name = ""
@@ -33,6 +33,7 @@
icon_dead = "parrot_dead"
pass_flags = PASSTABLE
can_collar = TRUE
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
var/list/clean_speak = list(
"Hi",
+1
View File
@@ -6,6 +6,7 @@
throwforce = 10
dont_save = TRUE //to avoid it messing up in buildmode saving
var/datum/mind/mind
blocks_emissive = EMISSIVE_BLOCK_GENERIC
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak