mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 01:51:46 +00:00
## About The Pull Request FOV as it is currently implemented is incompatible* with wallening. I'm doin wallening, so we gotta redo things here. The issue is the masking of mobs. Wallening relies on sidemap (layering based off physical position), which only works on things on the same plane (because planes are basically sheets we render down onto) So rather then masking mobs, let's reuse the masking idea from old fov, and use it to cut out a bit of the game render plane, and blur/over-saturate the bit that's masked out. My hope is this makes things visible in light, but not as much in darkness, alongside making more vivid shit more easily seen (just like real life) Here's some videos, what follows after is the commits I care about (since I had to rip a bunch of planes to nothing, so the files changed tab might be a bit of a mess) Oh also I had to remove the darkness pref since the darkness is doing a lot of the heavy lifting now. I'm sorry. Edit: NEW FOV SPRITES! Thanks dongle your aviator glasses will guide us to a better future. https://github.com/tgstation/tgstation/assets/58055496/afa9eeb8-8b7b-4364-b0c0-7ac8070b5609 https://github.com/tgstation/tgstation/assets/58055496/0eff040c-8bf1-47e4-a4f3-dac56fb2ccc8 ## Commits I Care About [Implements something like fov, but without the planes as layers hell](a604c7b1c8) Rather then masking out mobs standing behind us, we use a combo color matrix and blur filter to make the stuff covered by fov harder to see. We achive this by splitting the game plane into two, masking both by fov (one normally and one inversely), and then applying effects to one of the two. I want to make the fov fullscreens more gradient, but as an effect this is a good start [Removes WALL_PLANE_UPPER by adding a WALL_PLANE overlay to material walls (init cost comes here)](2548933739) @Mothblocks see this. comment in commit explains further but uh, we need to draw material walls to the light mask plane so things actually can be seen on them, but we can't do that and also have them be big, so they get an overlay. Sorry, slight init time bump, about 0.5 seconds. I can kill it with wallening. [Moves SEETHROUGH_PLANE above ABOVE_GAME_PLANE](beec4c00e0) I don't think it actually wants to draw here @Time-Green I think this was you so pinging for opinion [Resprites FOV masks to be clean (and more consistent)](f02ad13696) [f02ad13](f02ad13696) This is 100% donglesplonge's work, he's spent a week or so going back and forth with me sharpening these to a mirror shine, real chill ## Why It's Good For The Game Walls are closing in ## Changelog 🆑 LemonInTheDark, Donglesplonge image: Redoes fov "mask" sprites. They're clean, have a very pleasant dithering effect, and look real fuckin good! del: Changed FOV, it no longer hides mobs, instead it blurs the hidden area, and makes it a bit darker/oversaturated /🆑 ###### * It's technically possible if we start using render targets to create 2 sets of sources but that's insane and we aren't doing it
204 lines
7.7 KiB
Plaintext
204 lines
7.7 KiB
Plaintext
/**
|
|
* The mob, usually meant to be a creature of some type
|
|
*
|
|
* Has a client attached that is a living person (most of the time), although I have to admit
|
|
* sometimes it's hard to tell they're sentient
|
|
*
|
|
* Has a lot of the creature game world logic, such as health etc
|
|
*/
|
|
/mob
|
|
density = TRUE
|
|
layer = MOB_LAYER
|
|
animate_movement = SLIDE_STEPS
|
|
hud_possible = list(ANTAG_HUD)
|
|
pressure_resistance = 8
|
|
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
|
throwforce = 10
|
|
blocks_emissive = EMISSIVE_BLOCK_GENERIC
|
|
pass_flags_self = PASSMOB
|
|
// we never want to hide a turf because it's not lit
|
|
// We can rely on the lighting plane to handle that for us
|
|
see_in_dark = 1e6
|
|
// A list of factions that this mob is currently in, for hostile mob targeting, amongst other things
|
|
faction = list(FACTION_NEUTRAL)
|
|
/// The current client inhabiting this mob. Managed by login/logout
|
|
/// This exists so we can do cleanup in logout for occasions where a client was transfere rather then destroyed
|
|
/// We need to do this because the mob on logout never actually has a reference to client
|
|
/// We also need to clear this var/do other cleanup in client/Destroy, since that happens before logout
|
|
/// HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
|
|
var/client/canon_client
|
|
|
|
var/shift_to_open_context_menu = TRUE
|
|
|
|
/// Percentage of how much rgb to max the lighting plane at
|
|
/// This lets us brighten it without washing out color
|
|
/// Scale from 0-100, reset off update_sight()
|
|
var/lighting_cutoff = LIGHTING_CUTOFF_VISIBLE
|
|
// Individual color max for red, we can use this to color darkness without tinting the light
|
|
var/lighting_cutoff_red = 0
|
|
// Individual color max for green, we can use this to color darkness without tinting the light
|
|
var/lighting_cutoff_green = 0
|
|
// Individual color max for blue, we can use this to color darkness without tinting the light
|
|
var/lighting_cutoff_blue = 0
|
|
/// A list of red, green and blue cutoffs
|
|
/// This is what actually gets applied to the mob, it's modified by things like glasses
|
|
var/list/lighting_color_cutoffs = null
|
|
var/datum/mind/mind
|
|
var/static/next_mob_id = 0
|
|
|
|
/// List of movement speed modifiers applying to this mob
|
|
var/list/movespeed_modification //Lazy list, see mob_movespeed.dm
|
|
/// List of movement speed modifiers ignored by this mob. List -> List (id) -> List (sources)
|
|
var/list/movespeed_mod_immunities //Lazy list, see mob_movespeed.dm
|
|
/// The calculated mob speed slowdown based on the modifiers list
|
|
var/cached_multiplicative_slowdown
|
|
/// List of action speed modifiers applying to this mob
|
|
var/list/actionspeed_modification //Lazy list, see mob_movespeed.dm
|
|
/// List of action speed modifiers ignored by this mob. List -> List (id) -> List (sources)
|
|
var/list/actionspeed_mod_immunities //Lazy list, see mob_movespeed.dm
|
|
/// The calculated mob action speed slowdown based on the modifiers list
|
|
var/cached_multiplicative_actions_slowdown
|
|
/// List of action hud items the user has
|
|
var/list/datum/action/actions
|
|
///Cursor icon used when holding shift over things
|
|
var/examine_cursor_icon = 'icons/effects/mouse_pointers/examine_pointer.dmi'
|
|
|
|
/// Whether a mob is alive or dead. TODO: Move this to living - Nodrak (2019, still here)
|
|
var/stat = CONSCIOUS
|
|
|
|
/* A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
|
|
A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such.
|
|
The current method unnecessarily clusters up the variable list, especially for humans (although rearranging won't really clean it up a lot but the difference will be noticable for other mobs).
|
|
I'll make some notes on where certain variable defines should probably go.
|
|
Changing this around would probably require a good look-over the pre-existing code.
|
|
*/
|
|
|
|
/// The zone this mob is currently targeting
|
|
var/zone_selected = BODY_ZONE_CHEST
|
|
|
|
var/computer_id = null
|
|
var/list/logging = list()
|
|
|
|
/// The machine the mob is interacting with (this is very bad old code btw)
|
|
var/obj/machinery/machine = null
|
|
|
|
/// Tick time the mob can next move
|
|
var/next_move = null
|
|
|
|
/// What is the mobs real name (name is overridden for disguises etc)
|
|
var/real_name = null
|
|
|
|
|
|
/// Default body temperature
|
|
var/bodytemperature = BODYTEMP_NORMAL //310.15K / 98.6F
|
|
/// Our body temperatue as of the last process, prevents pointless work when handling alerts
|
|
var/old_bodytemperature = 0
|
|
|
|
/// Hunger level of the mob
|
|
var/nutrition = NUTRITION_LEVEL_START_MIN // randomised in Initialize
|
|
/// Satiation level of the mob
|
|
var/satiety = 0//Carbon
|
|
|
|
/// How many ticks this mob has been over reating
|
|
var/overeatduration = 0 // How long this guy is overeating //Carbon
|
|
|
|
/// The last known IP of the client who was in this mob
|
|
var/lastKnownIP = null
|
|
|
|
/// movable atom we are buckled to
|
|
var/atom/movable/buckled = null//Living
|
|
|
|
//Hands
|
|
///What hand is the active hand
|
|
var/active_hand_index = 1
|
|
/**
|
|
* list of items held in hands
|
|
*
|
|
* len = number of hands, eg: 2 nulls is 2 empty hands, 1 item and 1 null is 1 full hand
|
|
* and 1 empty hand.
|
|
*
|
|
* NB: contains nulls!
|
|
*
|
|
* `held_items[active_hand_index]` is the actively held item, but please use
|
|
* [get_active_held_item()][/mob/proc/get_active_held_item] instead, because OOP
|
|
*/
|
|
var/list/held_items = list()
|
|
|
|
//HUD things
|
|
|
|
/// Storage component (for mob inventory)
|
|
var/datum/storage/active_storage
|
|
/// Active hud
|
|
var/datum/hud/hud_used = null
|
|
|
|
/// Is the mob throw intent on
|
|
var/throw_mode = THROW_MODE_DISABLED
|
|
|
|
/// What job does this mob have
|
|
var/job = null//Living
|
|
|
|
/// Can this mob enter shuttles
|
|
var/move_on_shuttle = 1
|
|
|
|
///A weakref to the last mob/living/carbon to push/drag/grab this mob (exclusively used by slimes friend recognition)
|
|
var/datum/weakref/LAssailant = null
|
|
|
|
/// bitflags defining which status effects can be inflicted (replaces canknockdown, canstun, etc)
|
|
var/status_flags = CANSTUN|CANKNOCKDOWN|CANUNCONSCIOUS|CANPUSH
|
|
|
|
/// Can they interact with station electronics
|
|
var/has_unlimited_silicon_privilege = FALSE
|
|
|
|
///Calls relay_move() to whatever this is set to when the mob tries to move
|
|
var/atom/movable/remote_control
|
|
|
|
///the current turf being examined in the stat panel
|
|
var/turf/listed_turf = null
|
|
|
|
///The list of people observing this mob.
|
|
var/list/observers = null
|
|
|
|
///List of progress bars this mob is currently seeing for actions
|
|
var/list/progressbars = null //for stacking do_after bars
|
|
|
|
///For storing what do_after's someone has, key = string, value = amount of interactions of that type happening.
|
|
var/list/do_afters
|
|
|
|
///Allows a datum to intercept all click calls this mob is the source of
|
|
var/datum/click_intercept
|
|
|
|
///THe z level this mob is currently registered in
|
|
var/registered_z = null
|
|
|
|
var/memory_throttle_time = 0
|
|
|
|
/// Contains [/atom/movable/screen/alert] only.
|
|
///
|
|
/// On [/mob] so clientless mobs will throw alerts properly.
|
|
var/list/alerts = list()
|
|
var/list/screens = list()
|
|
var/list/client_colours = list()
|
|
var/hud_type = /datum/hud
|
|
|
|
var/datum/focus //What receives our keyboard inputs. src by default
|
|
|
|
/// Used for tracking last uses of emotes for cooldown purposes
|
|
var/list/emotes_used
|
|
|
|
///Whether the mob is updating glide size when movespeed updates or not
|
|
var/updating_glide_size = TRUE
|
|
|
|
///Override for sound_environments. If this is set the user will always hear a specific type of reverb (Instead of the area defined reverb)
|
|
var/sound_environment_override = SOUND_ENVIRONMENT_NONE
|
|
|
|
/// A mock client, provided by tests and friends
|
|
var/datum/client_interface/mock_client
|
|
|
|
var/interaction_range = 0 //how far a mob has to be to interact with something without caring about obsctruction, defaulted to 0 tiles
|
|
|
|
///the icon currently used for the typing indicator's bubble
|
|
var/active_typing_indicator
|
|
///the icon currently used for the thinking indicator's bubble
|
|
var/active_thinking_indicator
|
|
|