Replaces our lighting system with CM's. (#21465)

Depends on #21458.

Ports https://github.com/cmss13-devs/cmss13/pull/4229, with the original
authors as:

- https://github.com/tgstation/TerraGov-Marine-Corps/pull/1964 for the
lighting controller (A-lexa)
- https://github.com/tgstation/TerraGov-Marine-Corps/pull/4747 and
https://github.com/tgstation/TerraGov-Marine-Corps/pull/7263 for the
lighting (TiviPlus)
- https://github.com/tgstation/tgstation/pull/54520 for the dir lighting
component
- https://github.com/tgstation/tgstation/pull/75018 for the out of
bounds fix in lighting
- https://github.com/tgstation/TerraGov-Marine-Corps/pull/6678 for the
emissives (TiviPlus)

The main driving reason behind this is that current lighting consumes
way too much processing power, especially for things like odysseys/away
sites where a billion light sources are processing/moving at once and
the game slows down to a crawl. Hopefully this improves the situation by
a good margin, but we will need some testmerging to confirm that.
<img width="1349" height="1349" alt="image"
src="https://github.com/user-attachments/assets/1059ba2b-c0c5-495a-9c76-2d75d0c42bf2"
/>
<img width="1349" height="1349" alt="image"
src="https://github.com/user-attachments/assets/9704b0f6-4cf6-4dfd-a6cb-5702ad07d677"
/>


- [x] Resolve todos
- [x] Look into open space fuckery (border objects)

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
Co-authored-by: JohnWildkins <john.wildkins@gmail.com>
This commit is contained in:
Matt Atlas
2025-11-04 21:27:42 +00:00
committed by GitHub
co-authored by Matt Atlas JohnWildkins
parent 8ebd7c9ad5
commit 94d92803b4
395 changed files with 3906 additions and 3299 deletions
-15
View File
@@ -22,7 +22,6 @@
var/mob/owner = null
var/list/visibleChunks = list()
var/ghostimage = null
var/datum/visualnet/visualnet
///Set if the eye uses special click handling. Distinct from parent mob click handling for AI eye.
var/click_handler_type = /datum/click_handler/eye
@@ -30,21 +29,7 @@
///Whether or not our eye uses normal living vision handling
var/living_eye = TRUE
/mob/abstract/eye/New()
ghostimage = image(src.icon,src,src.icon_state)
SSmobs.ghost_darkness_images |= ghostimage //so ghosts can see the eye when they disable darkness
SSmobs.ghost_sightless_images |= ghostimage //so ghosts can see the eye when they disable ghost sight
updateallghostimages()
..()
/mob/abstract/eye/Destroy()
if (ghostimage)
SSmobs.ghost_darkness_images -= ghostimage
SSmobs.ghost_sightless_images -= ghostimage
qdel(ghostimage)
ghostimage = null
updateallghostimages()
release(owner)
owner = null
visualnet = null
+31 -14
View File
@@ -1,10 +1,8 @@
/mob/abstract/ghost
stat = DEAD
/// Toggle darkness.
var/see_darkness = FALSE
/// Is the ghost able to see things humans can't?
var/ghostvision = FALSE
var/ghostvision = TRUE
/// This variable generally controls whether a ghost has restrictions on where it can go or not (ex. if the ghost can bypass holy places).
var/has_ghost_restrictions = TRUE
/// If the ghost has antagHUD.
@@ -56,17 +54,22 @@
set name = "Toggle Darkness"
set category = "Ghost"
see_darkness = !see_darkness
update_sight()
/mob/abstract/ghost/proc/update_sight()
set_sight(sight|SEE_TURFS|SEE_MOBS|SEE_OBJS)
set_see_invisible(SEE_INVISIBLE_LEVEL_TWO)
if (!see_darkness)
set_see_invisible(SEE_INVISIBLE_NOLIGHTING)
else
set_see_invisible(ghostvision ? SEE_INVISIBLE_OBSERVER : SEE_INVISIBLE_LIVING)
var/level_message
switch(lighting_alpha)
if(LIGHTING_PLANE_ALPHA_VISIBLE)
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
level_message = "half night vision"
if(LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE)
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
level_message = "three quarters night vision"
if(LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
level_message = "full night vision"
if(LIGHTING_PLANE_ALPHA_INVISIBLE)
lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
level_message = "no night vision"
to_chat(src, SPAN_NOTICE("Night vision mode switched and saved to [level_message]."))
sync_lighting_plane_alpha()
/mob/abstract/ghost/verb/toggle_ghostsee()
set name = "Toggle Ghost Vision"
@@ -152,6 +155,20 @@
to_chat(src, SPAN_NOTICE("Now following \the <b>[target]</b>."))
update_sight()
/mob/abstract/ghost/proc/update_sight()
//if they are on a restricted level, then set the ghost vision for them.
if(on_restricted_level())
//On the restricted level they have the same sight as the mob
set_sight(sight&(~SEE_TURFS)&(~SEE_MOBS)&(~SEE_OBJS))
else
//Outside of the restrcited level, they have enhanced vision
set_sight(sight|SEE_TURFS|SEE_MOBS|SEE_OBJS)
if(ghostvision)
set_see_invisible(SEE_INVISIBLE_OBSERVER) //overmap viewing breaks if this is lower
else
set_see_invisible(SEE_INVISIBLE_LIVING)
/mob/abstract/ghost/proc/on_restricted_level(var/check)
if(!check)
check = z
@@ -1,5 +0,0 @@
/mob/abstract/ghost/observer/LateLogin()
..()
if (ghostimage)
ghostimage.icon_state = src.icon_state
updateghostimages()
@@ -8,6 +8,7 @@
blinded = FALSE
anchored = TRUE // don't get pushed around
invisibility = INVISIBILITY_OBSERVER
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
simulated = FALSE
universal_speak = TRUE
incorporeal_move = INCORPOREAL_GHOST
@@ -28,8 +29,6 @@
var/admin_ghosted = 0
/// If this ghost has enabled chat anonymization.
var/anonsay = 0
/// This mob's ghost image, for deleting and stuff.
var/image/ghostimage
/// If the ghost can be seen through cult shenanigans.
var/is_manifest = 0
/// Cooldown for ghost abilities, such as move_item().
@@ -42,10 +41,6 @@
set_stat(DEAD)
ghostimage = image(icon, src, icon_state)
SSmobs.ghost_darkness_images |= ghostimage
updateallghostimages()
var/turf/T
if (ismob(body))
T = get_turf(body) //Where is the body located?
@@ -54,6 +49,7 @@
var/originaldesc = desc
var/o_transform = transform
set_appearance(body)
underlays.Cut()
appearance_flags = KEEP_TOGETHER
desc = originaldesc
transform = o_transform
@@ -88,15 +84,6 @@
name = capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names))
real_name = name
/mob/abstract/ghost/observer/Destroy()
if (ghostimage)
SSmobs.ghost_darkness_images -= ghostimage
qdel(ghostimage)
ghostimage = null
updateallghostimages()
return ..()
/mob/abstract/ghost/observer/proc/initialise_postkey(set_timers = TRUE)
//This function should be run after a ghost has been created and had a ckey assigned
if (!set_timers)
@@ -574,47 +561,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/abstract/ghost/observer/can_admin_interact()
return check_rights(R_ADMIN, 0, src)
/mob/abstract/ghost/observer/update_sight()
//if they are on a restricted level, then set the ghost vision for them.
if(on_restricted_level())
//On the restricted level they have the same sight as the mob
set_sight(sight&(~SEE_TURFS)&(~SEE_MOBS)&(~SEE_OBJS))
set_see_invisible(SEE_INVISIBLE_OBSERVER)
else
//Outside of the restrcited level, they have enhanced vision
set_sight(sight|SEE_TURFS|SEE_MOBS|SEE_OBJS)
set_see_invisible(SEE_INVISIBLE_LEVEL_TWO)
if (!see_darkness)
set_see_invisible(SEE_INVISIBLE_NOLIGHTING)
else
set_see_invisible(ghostvision ? SEE_INVISIBLE_OBSERVER : SEE_INVISIBLE_LIVING)
updateghostimages()
/proc/updateallghostimages()
for (var/mob/abstract/ghost/observer/O in GLOB.player_list)
O.updateghostimages()
/mob/abstract/ghost/observer/proc/updateghostimages()
if (!client)
return
if (see_darkness || !ghostvision)
client.images -= SSmobs.ghost_darkness_images
client.images |= SSmobs.ghost_sightless_images
else
//add images for the 60inv things ghosts can normally see when darkness is enabled so they can see them now
client.images -= SSmobs.ghost_sightless_images
client.images |= SSmobs.ghost_darkness_images
if (ghostimage)
client.images -= ghostimage //remove ourself
/**
* We use this proc to set appearance because doing so resets the plane.
* We want the plane to stay at GHOST_PLANE to avoid weird overlaying stuff.
*/
/mob/abstract/ghost/observer/proc/set_appearance(new_appearance)
appearance = new_appearance
/mob/abstract/ghost/observer/proc/set_appearance(mob/body)
appearance = body.appearance
plane = GHOST_PLANE
/mob/abstract/ghost/observer/MayRespawn(var/feedback = 0, var/respawn_type = null)
+1 -1
View File
@@ -493,7 +493,7 @@ Lightstates:
light_factor = 1
if (T)
var/raw = min(T.get_uv_lumcount(0, 2) * light_factor * 5.5, 5.5)
var/raw = min(T.get_lumcount(0, 1) * light_factor * 5.5, 5.5)
return raw - 1.5
/// Getter for health.
@@ -1553,6 +1553,8 @@
nutrition_loss = HUNGER_FACTOR * species.nutrition_loss_factor
hydration_loss = THIRST_FACTOR * species.hydration_loss_factor
default_lighting_alpha = species.default_lighting_alpha
speech_bubble_type = species.possible_speech_bubble_types[1]
if(typing_indicator)
adjust_typing_indicator_offsets(typing_indicator)
@@ -1,4 +1,5 @@
/mob/living/carbon/human
light_system = MOVABLE_LIGHT
blocks_emissive = EMISSIVE_BLOCK_NONE
@@ -39,6 +40,8 @@
var/damage_multiplier = 1 //multiplies melee combat damage
var/icon_update = 1 //whether icon updating shall take place
var/default_lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
var/lipstick_color = null //no lipstick by default
var/age = 30 //Player's age (pure fluff)
@@ -79,7 +79,9 @@
equipment_prescription = equipment_prescription || G.prescription
if(G.overlay)
equipment_overlays |= G.overlay
if(G.see_invisible >= 0)
if(G.lighting_alpha != lighting_alpha)
lighting_alpha = G.lighting_alpha
if(G.see_invisible)
if(equipment_see_invis)
equipment_see_invis = min(equipment_see_invis, G.see_invisible)
else
@@ -672,7 +672,7 @@
if (!stop_sight_update)
to_chat(src, SPAN_NOTICE("Your eyes shift around, allowing you to see in the dark."))
src.stop_sight_update = 1
src.see_invisible = SEE_INVISIBLE_NOLIGHTING
src.lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
else
to_chat(src, SPAN_NOTICE("You return your vision to normal."))
@@ -1497,6 +1497,7 @@
return
if((mutations & XRAY))
set_sight(sight|SEE_TURFS|SEE_MOBS|SEE_OBJS)
lighting_alpha = default_lighting_alpha
/**
* This proc assumes that if shock_value = null, then a shock value was NOT passed in, and thus it calculates it itself.
@@ -61,6 +61,7 @@
spawn_flags = IS_RESTRICTED
vision_flags = DEFAULT_SIGHT | SEE_MOBS
default_lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
has_organ = list(
BP_EYES = /obj/item/organ/internal/eyes/night/revenant
@@ -198,6 +198,7 @@
slowdown = 1
vision_flags = DEFAULT_SIGHT
default_lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
reagent_tag = IS_UNDEAD
@@ -450,6 +450,8 @@
var/snore_key = "snore"
/// Whether this species can choose to sleep indefinitely
var/indefinite_sleep = FALSE
/// The default lighting alpha of this species. Override to set innate NVGs.
var/default_lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
/datum/species/proc/get_eyes(var/mob/living/carbon/human/H)
return
@@ -736,7 +738,8 @@
var/obj/item/organ/internal/eyes/night/NE = H.get_eyes()
if(istype(NE) && NE.night_vision && NE.can_change_invisible())
H.set_see_invisible(SEE_INVISIBLE_NOLIGHTING)
H.lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
H.update_sight()
return 1
@@ -516,7 +516,7 @@ There are several things that need to be remembered:
var/datum/sprite_accessory/hair_style = GLOB.hair_styles_list[h_style]
if (hair_style)
var/col = species.get_light_color(src) || "#FFFFFF"
set_light(species.light_range, species.light_power, col, uv = 0, angle = LIGHT_WIDE)
set_light(species.light_range, species.light_power, col)
else
set_light(0)
@@ -1509,6 +1509,11 @@ There are several things that need to be remembered:
if(QDELETED(src))
return
if(!on_fire)
set_light_on(FALSE)
else
set_light_on(TRUE)
var/image/fire_image_lower = on_fire ? image(species.onfire_overlay, "lower", layer = FIRE_LAYER_LOWER) : null
var/image/fire_image_upper = on_fire ? image(species.onfire_overlay, "upper", layer = FIRE_LAYER_UPPER) : null
+1
View File
@@ -173,6 +173,7 @@
var/list/vision = get_accumulated_vision_handlers()
set_sight(sight | vision[1])
set_see_invisible(max(vision[2], see_invisible))
sync_lighting_plane_alpha()
/mob/living/proc/update_living_sight()
var/set_sight_flags = is_ventcrawling ? (SEE_TURFS) : sight & ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
+4 -5
View File
@@ -113,7 +113,6 @@
light_power = 0
light_range = 4
light_color = COLOR_BRIGHT_GREEN
light_wedge = 45
/mob/living/silicon/pai/movement_delay()
return 0.8
@@ -140,21 +139,21 @@
/mob/living/silicon/pai/proc/toggle_flashlight()
flashlight_active = !flashlight_active
if(flashlight_active)
set_light(4, 1, COLOR_BRIGHT_GREEN, angle = 45)
set_light(4, 1, COLOR_BRIGHT_GREEN)
else
set_light(0)
/mob/living/silicon/pai/set_light(l_range, l_power, l_color, uv, angle, no_update)
/mob/living/silicon/pai/set_light(l_range, l_power, l_color)
..()
if(istype(loc, /obj/item/holder/pai))
var/obj/item/holder/pai/P = loc
P.set_light(l_range, l_power, l_color, uv, angle, no_update)
P.set_light(l_range, l_power, l_color)
/mob/living/silicon/pai/post_scoop()
..()
if(istype(loc, /obj/item/holder/pai))
var/obj/item/holder/pai/P = loc
P.set_light(light_range, light_power, light_color, uv_intensity, light_wedge)
P.set_light(light_range, light_power, light_color)
/mob/living/silicon/pai/Initialize(mapload)
var/obj/item/device/paicard/paicard = loc
@@ -154,10 +154,10 @@
set_see_invisible(SEE_INVISIBLE_LEVEL_TWO)
else if((sight_mode & BORGMESON) && (sight_mode & BORGTHERM))
set_sight(sight|SEE_TURFS|SEE_MOBS)
set_see_invisible(SEE_INVISIBLE_NOLIGHTING)
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
else if(sight_mode & BORGMESON)
set_sight(sight|SEE_TURFS)
set_see_invisible(SEE_INVISIBLE_NOLIGHTING)
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
else if(sight_mode & BORGMATERIAL)
set_sight(sight|SEE_OBJS)
else if(sight_mode & BORGTHERM)
@@ -34,7 +34,6 @@
var/speed = 0
// Lighting and sight
light_wedge = LIGHT_WIDE
var/lights_on = FALSE // Is our integrated light on?
var/intense_light = FALSE // Whether cyborg's integrated light was upgraded
var/sight_mode = NO_HUD
@@ -53,7 +53,6 @@
var/can_hear_hivenet = TRUE
// Misc
uv_intensity = 175 //Lights cast by robots have reduced effect on diona
mob_thinks = FALSE
var/can_speak_basic = TRUE
@@ -31,7 +31,7 @@
minbodytemp = 0
flying = TRUE
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
sample_data = list("Cellular biochemistry include bioluminescent reactions", "Tissue sample contains micro-gas release structures")
/mob/living/simple_animal/cosmozoan/Initialize()
@@ -21,7 +21,7 @@
icon_dead = "rat_gray_dead"
icon_rest = "rat_gray_sleep"
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
var/swarm_name = "peasentry"
var/announce_name = "Request"
@@ -101,7 +101,7 @@
environment_smash = 1
attack_emote = "wiggles toward"
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
blood_type = "#281C2D"
@@ -131,7 +131,7 @@
mob_size = 5
attack_emote = "hums at"
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
smart_ranged = TRUE
@@ -79,7 +79,3 @@
/mob/living/simple_animal/hostile/scarybat/cult/cultify()
return
/mob/living/simple_animal/hostile/scarybat/cult/Life(seconds_per_tick, times_fired)
..()
check_horde()
@@ -33,7 +33,7 @@
attacktext = "mangled"
attack_sound = 'sound/weapons/bloodyslice.ogg'
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
pixel_x = -16
speed = -1
@@ -37,7 +37,7 @@
attack_sound = 'sound/weapons/bloodyslice.ogg'
emote_sounds = list('sound/effects/creatures/bear_loud_1.ogg', 'sound/effects/creatures/bear_loud_2.ogg', 'sound/effects/creatures/bear_loud_3.ogg', 'sound/effects/creatures/bear_loud_4.ogg')
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
minbodytemp = 0
maxbodytemp = 350
@@ -166,7 +166,7 @@
attacktext = "mangled"
attack_sound = 'sound/weapons/bloodyslice.ogg'
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
pass_flags = PASSTABLE
@@ -37,6 +37,3 @@
/mob/living/simple_animal/hostile/creature/cult/cultify()
return
/mob/living/simple_animal/hostile/creature/cult/Life(seconds_per_tick, times_fired)
..()
check_horde()
@@ -64,10 +64,6 @@
/mob/living/simple_animal/hostile/faithless/cult/cultify()
return
/mob/living/simple_animal/hostile/faithless/cult/Life(seconds_per_tick, times_fired)
..()
check_horde()
/mob/living/simple_animal/hostile/faithless/can_fall()
return FALSE
@@ -520,42 +520,6 @@ ABSTRACT_TYPE(/mob/living/simple_animal/hostile)
return UnarmedAttack(target, TRUE)
return ..()
/mob/living/simple_animal/hostile/proc/check_horde()
if(GLOB.evacuation_controller.is_prepared())
if(!enroute && !last_found_target) //The shuttle docked, all monsters rush for the escape hallway
if(!shuttletarget && GLOB.escape_list.len) //Make sure we didn't already assign it a target, and that there are targets to pick
shuttletarget = pick(GLOB.escape_list) //Pick a shuttle target
enroute = 1
stop_automated_movement = 1
if(!src.stat)
horde()
if(get_dist(src, shuttletarget) <= 2) //The monster reached the escape hallway
enroute = 0
stop_automated_movement = 0
/mob/living/simple_animal/hostile/proc/horde()
var/turf/T = get_step_to(src, shuttletarget)
for(var/atom/A in T)
if(istype(A,/obj/machinery/door/airlock))
var/obj/machinery/door/airlock/D = A
D.open(1)
else if(istype(A,/obj/structure/simple_door))
var/obj/structure/simple_door/D = A
if(D.density)
D.Open()
else if(istype(A,/obj/structure/cult/pylon))
A.attack_generic(src, rand(melee_damage_lower, melee_damage_upper))
else if(istype(A, /obj/structure/window) || istype(A, /obj/structure/closet) || istype(A, /obj/structure/table) || istype(A, /obj/structure/grille))
A.attack_generic(src, rand(melee_damage_lower, melee_damage_upper))
Move(T)
var/atom/target = FindTarget()
if(istype(target) && !QDELETED(target))
set_last_found_target(target)
if(!last_found_target || enroute)
if(!src.stat)
horde()
//////////////////////////////
///////VALIDATOR PROCS////////
//////////////////////////////
@@ -56,7 +56,7 @@
tameable = FALSE
flying = TRUE
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
psi_pingable = FALSE
sample_data = null
@@ -41,9 +41,6 @@
///Overlay of a screen to display on the zombie's monitor
var/image/screen_overlay
///Emissive overlay of above
var/image/emissive_overlay
///IPC corpse to spawn on the simplemob's death
var/corpse = /obj/effect/landmark/corpse/ipc_zombie
@@ -30,7 +30,7 @@
attacktext = "punished"
attack_sound = 'sound/weapons/bladeslice.ogg'
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
minbodytemp = 0
maxbodytemp = 350
@@ -31,7 +31,7 @@
attacktext = "chomped"
attack_sound = 'sound/weapons/bloodyslice.ogg'
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
faction = "Moghes"
butchering_products = list(/obj/item/stack/material/animalhide/lizard = 20)
@@ -32,7 +32,7 @@
melee_damage_lower = 12
melee_damage_upper = 16
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
stop_sight_update = TRUE
minbodytemp = 0
@@ -95,10 +95,10 @@
set desc = "Toggles whether you see light or not."
set category = "Abilities"
if(see_invisible == SEE_INVISIBLE_NOLIGHTING)
see_invisible = SEE_INVISIBLE_LIVING
if(lighting_alpha == LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
else
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
/mob/living/simple_animal/hostile/morph/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended)
if(morphed)
@@ -31,7 +31,7 @@
mob_swap_flags = HUMAN|SIMPLE_ANIMAL|SLIME|MONKEY
mob_push_flags = ALLMOBS
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
minbodytemp = 0
maxbodytemp = 350
@@ -195,7 +195,7 @@
tameable = FALSE
flying = TRUE
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
emote_sounds = list('sound/effects/creatures/PRA_drone.ogg')
@@ -45,7 +45,7 @@
faction = "cavern"
flying = TRUE
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
/mob/living/simple_animal/hostile/retaliate/cavern_dweller/Allow_Spacemove(var/check_drift = 0)
return 1
@@ -110,7 +110,6 @@
max_n2 = 0
minbodytemp = 0
light_range = 10
light_wedge = LIGHT_WIDE
psi_pingable = FALSE
faction = "sol"
@@ -316,7 +316,7 @@
desc = "This pulsating brain seems somehow connected to all the other orifices in this room..."
icon = 'icons/mob/npc/cavern.dmi'
icon_state = "sarlaccbrain"
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
universal_speak = 1
universal_understand = 1
@@ -53,7 +53,7 @@
attack_emote = "nashes at"
flying = TRUE
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
smart_melee = FALSE
sample_data = list("Cellular structure shows adaptation for survival in vacuum", "Genetic biomarkers identified linked with agressiveness", "Tissue sample contains micro-gas release structures")
@@ -307,5 +307,5 @@
attack_emote = "nashes at"
flying = TRUE
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
sample_data = list("Cellular structure shows adaptation for survival in vacuum", "Genetic biomarkers identified linked with agressiveness", "Tissue sample contains micro-gas release structures")
@@ -13,7 +13,7 @@
emote_hear = list("chitters")
speak_chance = 5
turns_per_move = 5
see_invisible = SEE_INVISIBLE_NOLIGHTING
lighting_alpha = LIGHTING_PLANE_ALPHA_SOMEWHAT_INVISIBLE
meat_type = /obj/item/reagent_containers/food/snacks/xenomeat
organ_names = list("thorax", "legs", "head")
response_help = "pets"
+9 -9
View File
@@ -1574,15 +1574,15 @@
// if(thing.item_flags & SLOWS_WHILE_IN_HAND)
. += thing
/mob/proc/check_emissive_equipment()
var/old_zflags = z_flags
z_flags &= ~ZMM_MANGLE_PLANES
for(var/atom/movable/AM in get_equipped_items(INCLUDE_POCKETS|INCLUDE_HELD))
if(AM.z_flags & ZMM_MANGLE_PLANES)
z_flags |= ZMM_MANGLE_PLANES
break
if(old_zflags != z_flags)
UPDATE_OO_IF_PRESENT
///Set the lighting plane hud alpha to the mobs lighting_alpha var
/mob/proc/sync_lighting_plane_alpha()
if(hud_used)
var/atom/movable/screen/plane_master/lighting/lighting = hud_used.plane_masters["[LIGHTING_PLANE]"]
if (lighting)
lighting.alpha = lighting_alpha
var/atom/movable/screen/plane_master/lighting/exterior_lighting = hud_used.plane_masters["[EXTERIOR_LIGHTING_PLANE]"]
if (exterior_lighting)
exterior_lighting.alpha = min(GLOB.minimum_exterior_lighting_alpha, lighting_alpha)
#undef UNBUCKLED
#undef PARTIALLY_BUCKLED
+2
View File
@@ -6,6 +6,8 @@
sight = DEFAULT_SIGHT
blocks_emissive = EMISSIVE_BLOCK_GENERIC
pass_flags_self = PASSMOB
// Determines what the alpha of the lighting is to this mob.
var/lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
var/datum/mind/mind
var/static/next_mob_id = 0
-5
View File
@@ -452,11 +452,6 @@
use_mob.forceMove(get_step(use_mob, direct))
use_mob.dir = direct
// Crossed is always a bit iffy
for(var/obj/S in use_mob.loc)
if(istype(S,/obj/effect/step_trigger) || istype(S,/obj/effect/beam))
S.Crossed(use_mob)
var/area/A = get_area_master(use_mob)
if(A)
A.Entered(use_mob)